Skip to content

Latest commit

 

History

History
31 lines (16 loc) · 996 Bytes

File metadata and controls

31 lines (16 loc) · 996 Bytes

Loops

Comparison Operators

a comparison operator compares its operands and returns a logical value based on whether it comes back true. The operands can be any value type, but if they are two different types javascript will attempt to convert them into an appropriate type for comparison, except when === or !== are used, since they check the contained data AND data type.

Assignment Operators

an assignment operator assigns a value to the left operand based on the value of the left operand, as in x = 3

For Loops

a for loop repeats until a specific condition evaluates to false.

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

statement

While Loops

a while loop executes its statement as long as a specific condition is true.

while (condition)

statement

if the condition becomes false the statement stops and exits the loop. for multiple statement you can use a code block.

< table of contents

< back