javascript comment line 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: how to comment in javascript

/* this is a javascript comment
that is multi lines */
// This is a single line comment

Example 4: 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 5: comment in JavaScript

// This is how you comment a single line in JavaScript

/*
This is how you comment
multiple lines in 
JavaScript
*/

Example 6: comment in js

// use '//'