< Back to JavaScript notes

Comments

Some tips for when you need to comment JavaScript

Resources:


Code should aim to be self-explanatory, but that’s not always possible. Comments can help give extra context when needed. They can either one line or multiple lines.

// One line comment!

/*
    Multiple line comment!
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis cumque, laboriosam architecto culpa aliquid distinctio maxime dicta vel mollitia expedita! Et nisi debitis nam earum facere beatae eius doloremque suscipit.
*/