1//A single line comment, also known as an end of line comment.
2
3/*This is a longer
4 multiline comment.
5*/
6
7var str /*Multiline comments can be added almost anywhere!*/ = "foo";
1<script type="text/javascript">
2<!--
3// This is a single line JavaScript comment
4
5document.write("I have comments in my JavaScript code!");
6//document.write("You can't see this!");
7//-->
8</script>
9
10