Advertisements
Advertisements
Question
What are the comments in JavaScript?
Short Note
Solution
There are two types of comments, Single line and Multiple lines comments.
- Single-line comments begin with a double slash (//), causing the interpreter to ignore everything from that point to the end of the line.
- Multiple line comments begins with /* and ends with */.
For example:
// JavaScript single line comment .
/* Multiple line
comments */
shaalaa.com
Comments in Javascript
Is there an error in this question or solution?