Comments: Comments are used to describe the code or document. These are 2 types
- Single-line Comment
- Multi-line Comment
Single line Comment: It is represented by double forward slashes (//).
var c=a+b; // + operator add values of a & b and store result into c
document.write(c); // write() – display information of web page
Multi line Comment: It can be used describe the entire document.
|/* This program is used to perform Addition operation of 2 numbers|
And display result on Web page Using document.write() method */