block comments js code example

Example 1: javascript comment

//This is a javascript single line comment

/*
And here is a
multiline comment
*/

Example 2: comment in javascript

// single line comment 

/* multiline comemnt 
line 2
line 3
line 4 */

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: block comment js

/* this is a block 
comment in javascript */