Comments JavaScript

Comments JavaScript:

  • Single line comments start with //

0==false   // true

//This is variable

Var iValue=5;

  • Multi line comments start with /* and end with */

/*
The code below will write
to a heading and to a paragraph,
and will represent the start of
my homepage:
*/
document.getElementById(“myH1″).innerHTML=”Welcome to my Homepage”;

Please visit Comment in JavaScript for more detailed information.

Leave a Reply