Using Statements

Each statement represents a single command, and statements are usually terminated by a semicolon (;).

 
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
  <script type="text/javascript">
    document.writeln("This is a statement");
    document.writeln("This is also a statement");
  </script>
</body>
</html>
  
Click to view the demo
Home 
  JavaScript Book 
    Language Basics  

Script Element:
  1. Getting Ready to Use JavaScript and <SCRIPT> ELEMENT
  2. Deferred Scripts
  3. Asynchronous Scripts
  4. <NOSCRIPT> ELEMENT
  5. Using Statements