Introduction
When we write JavaScript code we need to comment sometimes to state description or text or some explanation while writing the code, we need to comment on some lines in the code.
There are two types of comments,
- Single line
- Multi-line
For the Single-line comments, you can use “//”.
As for example
- //This is a variable
- var x = 0;
- var x = 0; // This is a variable
- For the Multi line comments, you
- /*
- Here you can comment multiple lines within them
- */
- As
- for example
- /*
- This is a variable
- This is a variable
- This is a variable
- This is a variable
- */
- var x = 0;

Join the conversation! Your thoughts help the community grow.