Using Statements - Javascript Language Basics

Javascript examples for Language Basics:Introduction

Introduction

The basic JavaScript building block is the statement.

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

Demo Code

ResultView the demo in separate window

<!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>/*from   w w  w .  ja  v  a2s.  c o  m*/

Related Tutorials