Using JavaScript Comment Tags
<html>
<head>
<title>JavaScript Unleashed</title>
</head>
<body>
<script type="text/javascript">
<!--
// Variables
var firstName = "Jon";
var lastName = "Simpson";
var internetAddress = "jsimpson@company.com";
/*------------------------------------------
Display the user's first and last name along with their e-mail address.
------------------------------------------*/
// Combine three strings
document.writeln(firstName + " " + lastName + "<br>");
document.writeln("e-mail address: " + internetAddress);
// -->
</script>
</body>
</html>
Related examples in the same category