There are two type of comments are available in javascript
1. Single line comment
2. Multiple line comment
Single line comment
Single line comment is used to comment a single line of code.
Syntax
//the code we need to comment
Example
// var total=0;
Multiple line comment
Multiple line comment is used to comment a block of coded that is multy line commenting.
Syntax
/* the code we need to comment line 1 the code we need to comment line 2 the code we need to comment line 3 */
Example
/* var a=10; var b=20; var c=a+b; */