JavaScript Comments


Comments:


There are two types of comments in JavaScript…

  1. Single line comment
  2. Multi-line-comment


Single line comment :

Single line comment is denoted with two forward slashes (//). For example, 
// comment text will be inserted here

Multi-line-comment : 

Multi-line-comment is denoted with /* */. As for example, 
/* comment text will be inerted here */
Basically, multi-line-comment is used to comment on the Javascript codes. It prevents the block of code from running.

Post a Comment

Previous Post Next Post