- A computer program is a list of "instructions" to be "executed" by a computer.
- In a programming language, these programming instructions are called statements.
- This statement tells the browser to write "Hello Dolly." inside an HTML element with id="demo":
- Add a semicolon at the end of each executable statement:
|var||Declares a variable|
|let||Declares a block variable|
|const||Declares a block constant|
|if||Marks a block of statements to be executed on a condition|
|switch||Marks a block of statements to be executed in different cases|
|for||Marks a block of statements to be executed in a loop|
|function||Declares a function|
|return||Exits a function|
|try||Implements error handling to a block of statements|