|
A JavaScript program is simply a sequence of one or more JavaScript statements. JavaScript Statements is used to define the logic to make something happen. A statement can be used to declare a variable and assign a value. A statement can also be a function call, i.e. document.write(). JavaScript Statements are separated from each other with semicolons. The semicolon is optional in JavaScript, if you place each JavaScript statement on a separate line, JavaScript allows us to leave out the semicolons. The best practice of defining JavaScript Statements is to use semicolons, everywhere at the end of the each JavaScript statement. |
 |