<font color=black>This is visible</font>
<!-- This will be hidden. -->
<font color=green>This is visible</font>
JavaScript code can be commented two different ways. Line by line commenting is achieved by placing double slashes at the very beginning of the comment like this:
<script>
This line will execute
// This line will be ignored.
This line will execute
</script>
Entire sections of JavaScript code can be commented by enclosing the lines in /* and */
<script>
This line will execute
/*
All of these lines will be ignored.
All of these lines will be ignored.
All of these lines will be ignored.
*/
This line will execute
</script>