add comment in js code example
Example 1: 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 2: comment in JavaScript
// This is how you comment a single line in JavaScript
/*
This is how you comment
multiple lines in
JavaScript
*/
Example 3: comment in js
// use '//'
Example 4: 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>