Comments in JavaScript


Note that these comments are JavaScript comments and must appear between the SCRIPT and /SCRIPT tags in order to be recognised by JavaScript. HTML uses different characters to comment and use of JavaScript comments outside of the SCRIPT tags will probably do odd things.


//This comment will ignore the rest of the line

a = a + 1;  //So will this comment

/*
These comments are multi-line comments
and there is some more text on this
and this line too
*/