JavaScript Statements Reference Manual
JavaScript Statements
In HTML, JavaScript statement is sent to the browser's "command."
It tells the browser what to do.
The following examples JavaScript statement tells the browser output "Hello Dolly" to id = "demo" HTML element:
More on statements tutorial, please refer to our JavaScript tutorial statements .
JavaScript statement identifies
JavaScript JavaScript statement is usually a statement identifier to identify an action to perform.
Statement identifiers are reserved keywords can not be used as a variable name.
The following table lists all of the JavaScript statement:
Statements | description |
---|---|
break | Exit witch statement or loop |
continue | In the cycle skip the current iteration, and continue to the next iteration of the loop |
debugger | Stop executing JavaScript, and invoke the debugger function |
do ... while | Execute a block of statements to continue execution of the statement block in a conditional statement is true. |
for | When conditional statement is true, the code block can execute a specified number of times. |
for ... in | For loop through the array, or property of an object (or objects on the property array cycle operation). |
function | Define a function |
if ... else ... else if | It used based on different criteria to perform different actions. |
return | Exit function and return value function |
switch | It used based on different criteria to perform different actions. |
throw | Throw (generate) error. |
try ... catch ... finally | Implement error handling, use in conjunction with the catch. |
var | Declare a variable. |
while | When the conditional statement is true, the execution block. |