JavaScript Statements

A JavaScript statement is a command to a browser. The purpose of the command is to tell the browser what to do.The following JavaScript statement tells the browser to write “Hello Dolly” to the Web page:

document.write("Hello world");

It is normal to add a semicolon at the end of each executable statement. Most people think this is a good programming practice, and most often you will see this in JavaScript examples on theWeb. The semicolon is optional (according to the JavaScript standard), and the browser is supposed to interpret the end of the line as the end of the statement. You often will see examples without the semicolon at the end.

Share on Google Plus

About rourn vireak

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

0 comments:

Post a Comment