js multiple line comment code example

Example 1: javascript comment

//This is a javascript single line comment

/*
And here is a
multiline comment
*/

Example 2: multiline comment js

/* this is
   an multi -line
   comment */

Example 3: comment out in javascript

<script type="text/javascript">
<!--
document.write("I have multi-line comments!");
/*document.write("You can't see this!");
document.write("You can't see this!");
document.write("You can't see this!");
document.write("You can't see this!");
document.write("You can't see this!");
document.write("You can't see this!");
document.write("You can't see this!");*/
//-->
</script>

Example 4: js comment

//This does not effect the code.
var something = "But this does effect the code!";

Example 5: comment out in javascript

<script type="text/javascript">
<!--
// This is a single line JavaScript comment

document.write("I have comments in my JavaScript code!");
//document.write("You can't see this!");
//-->
</script>

Tags:

Css Example