For two reasons we can have comments in the code, one is to define the description of the specific code and the another thing is to prevent the execution of code .
1. Single line comment
2. Multiple line comment
Single line comment
Single line comment is used to comment a single line of code.
//the code we need to comment
// var total=0;
Multiple line comment
Multiple line comment is used to comment a block of coded that is multy line commenting.
/* the code we need to comment line 1 the code we need to comment line 2 the code we need to comment line 3 */
/* var a=10; var b=20; var c=a+b; */