Single-line comments begin with two slashes
The two slashes after
// variable x is defined var x; // the value of 5 is assigned to the variable x x = 5;
In the example below, information about what the code will do after the code is given as a comment.
var x; // variable x is defined x = 5; // the value of 5 is assigned to the variable x
Multiline comments begin with
/* and end with
*/ will not be executed.
/* variable x is defined variable x is assigned a value of 5 */ var x; x = 5;
Disable your codes
Disable single line code;
var x; x = 5; // alert(x * 10);
Disable multiple lines of code;
/* var x; x = 5; alert(x * 10); */