Changes

Jump to: navigation, search

Comments in JavaScript

391 bytes added, 15:27, 19 April 2007
Multi-line Comments
}
</pre>
 
Multi-line comments are particularly useful for commenting out sections of a script you no longer wish to run but do not yet wish to delete, together with an explanation of when and why you have comment it out:
 
<pre>
/*
 
Commented out December 23 while testing improved version
 
var myValue = 1;
 
var myString = "My lucky number is ";
 
document.writeln ( mayString + myValue );
 
*/
</pre>

Navigation menu