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 some lines in the code.
There are two types of commenting,
- Single line
- Multi-line
For the Single line comments, you can use “//”.
As for example
-
- var x = 0;
- var x = 0;
- For the Multi line comments, you
-
-
-
- As
- for example
-
-
-
-
-
-
- var x = 0;
Keep learning, Cheers !