WHAT A LAMP Rotating Header Image

Add comments to scripts

The JavaScript interpreter ignores . do have value, though; they’re very useful for explaining things to human readers of your script. Of course, including yourself.

1) Single-line comment

//Single-line don’t require an ending slash.

2) Multiple-line comment

/* This comment can span multiple lines. Always remember
to close it. Though; if you forge. you’ll get weird errors when
you try to display your script. */

Note:
Don’t mix up HTML comment <!– HTML comment –> and JavaScript comment.

Related posts

Comments are closed.