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.
0 comments:
Post a Comment