Friday, August 16, 2013

JavaScript single line comments

<html>
<body>

<script type="text/javascript">
// Write a heading
document.write("<h1>This is a heading</h1>");
// Write two paragraphs:
document.write("<p>This is a paragraph.</p>");
document.write("<p>This is another paragraph.</p>");
</script>

</body>
</html>

Result


No comments: