JavaScript Code

JavaScript Comments


comments are descriptive part of the code that are used only for program readability, but ignored by the interpreter

based on the number of lines a comment can be written, we have single line comments, and multiline comments

Single Line Comments

single line comments start with double forward slash //

//this is a single line comment

Multiline Comments

multiline comments start with /* and end with */ spanning one or more lines

this comment
has multiple