Changes

Jump to: navigation, search

Comments in JavaScript

426 bytes added, 15:04, 19 April 2007
Single Line Comments
// This is another comment
</pre>
 
The // syntax tells the intepreter that everything on the same line following on from the // is a comment and should be ignored. This means that anything on the the line before the // comment marker it is ''not'' ignored. The advantage of this is that it enables comments to placed at the end of a line of scripting. For example:
 
<pre>
 
var myString = "Welcome to Technotopia"; // Variable containing welcome string
 
</pre>

Navigation menu