freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../basic-javascript/comment-your-javascript-code/index.md

697 B

title
Comment Your JavaScript Code

Comment Your JavaScript Code

Commenting allows you to type stuff that you don't want the computer to run as code. For example, notes to other programmers, directions, and more. Here's how to create a single-line comment.

// Hey, I'm a comment!

Now, if you want to comment an entire paragraph, that can be easily accomplished with...

/*
  Hey, I'm a paragraph comment.
  This allows for programmers to
  write tons and tons of random
  words, without the fear of me
  being compiled!
*/