Single line comments : Comments : Language Basics JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Language Basics » Comments »

 

Single line comments







The // comment tag enables comments to be placed between the // and the end of the line.












<html>
<head>
<title>A Simple Page</title>
<script language="javascript">
<!--
// The first alert is below
alert("An alert triggered by JavaScript!");
// Here is the second alert
alert("A second message appears!");
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Language Basics
» Comments