Comment is nothing but it is a statement which is not display on browser window. it is useful to understand the which code is written for what purpose.
Comments are useful in every programming language to deliver message. It is used to add information about the code, warnings or suggestions so that the end user or other developer can easily interpret the code.
- Single-line Comment
- Multi-line Comment
It is represented by double forward slashes //. It can be used before any statement.
It can be used to add single as well as multi line comments.
It is represented by forward slash / with asterisk * then asterisk with forward slash.