View on GitHub

reading-notes

Operators and Loops

JavaScript has both binary and unary operators, and one special ternary operator, the conditional operator. A binary operator requires two operands, one before the operator and one after the operator:

JavaScript has the following types of operators :

The conditional operator is the only JavaScript operator that takes three operands. The operator can have one of two values based on a condition.

for more detail click HERE


Loops (for , while Statement)

A for loop repeats until a specified condition evaluates to false. A for statement looks as follows:

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

A do…while statement looks as follows:

do

statement

while (condition);

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

A while statement looks as follows:

while (condition)

statement

## for more detail click HERE