Computer And Programing
Computer Solution and Programing Solution

How To Add comments to your JavaScript

Category: By zmoerf
JavaScript Support Comment ?
JavaScript supports a one-line comment with the double slash (//) marker so you can add comment to you javascript, which means that JavaScript doesn’t read anything on a line after // javascript can't not be run or progress. if you want to add comments for people to read throughout your code, and they won’t interrupt how your JavaScript runs. See the comment line added in bold in the following code:






A First Script




I want to add several line comment ?
In fact, JavaScript also supports a second type of comment or several comment, which you can
use for multiple lines. This comment starts with /* and ends with */. When
JavaScript sees /*, it ignores everything else until it sees */. Here’s an
example:







A First Script

A First Script




now you can add comment in your javascript!!!
 

0 comments so far.

Something to say?