JavaScript
statements can be grouped together in blocks. Blocks start with a left curly bracket { and end with a right
curly bracket }.The
purpose of a block is to make the
sequence of statements execute together.
<html>
<body>
<script type="text/javascript">
{
document.write("<h1>This is a
heading</h1>");
document.write("<p>This is a
paragraph.</p>");
document.write("<p>This is another
paragraph.</p>");
}
</script>
</body>
</html>
0 comments:
Post a Comment