Reading-notes

Operators :

Loops and iteration:

Loops offer a quick and easy way to do something repeatedly. This chapter of the JavaScript Guide introduces the different iteration statements available to JavaScript.

1- for statement:

A for loop repeats until a specified condition evaluates to false. The JavaScript for loop is similar to the Java and C for loop.

for ([initialExpression]; [conditionExpression]; [incrementExpression]) statement

2- do…while statement:

The do…while statement repeats until a specified condition evaluates to false.

do

` statement`

while (condition);

3- while statement

A while statement executes its statements as long as a specified condition evaluates to true.

while (condition)

statement

## 4-break statement Use the break statement to terminate a loop, switch, or in conjunction with a labeled statement.

break;

break [label];

5- for…in statement

The for…in statement iterates a specified variable over all the enumerable properties of an object.

for (variable in object)

` statement`