Two types of Comment
- Single Line Comment
- Multi Line Comment
Single Line Comment
Single line comments start with //.
Text between // and the end of the line will be ignored by JavaScript.
// you can assign any type of value
var imvalue = 101;
var imvalue = 101; // assign any type of value
Multi Line Comment
Multi-line comments start with /* and end with /.
Any text between / and */ will be ignored by JavaScript.
Ex: –
/* Comment Here */
Adding // in front of a code line changes the code lines from an executable line to a comment.
var imvalue = 101;
// var imvalue = 101;
Latest posts by rajeshkumar (see all)
- AWS Error: Access denied by EC2 Instance Connect - December 4, 2023
- How to get Blackduck Trial version? - December 3, 2023
- PHP ionCube Error: cannot be decoded by this version of the ionCube Loader - December 2, 2023