Reading-Notes
code fellows 102
Read: 08 - Operators and Loops
Ref to operators
For info about operations see previous notes: Dynamic web pages with JavaScript or check out these references:
Loops
A Loop in coding is a fast way to do something repetedly and quickly. Types of loops include:
- for statement
- do…while statement
- while statement
- labeled statement
- break statement
- continue statement
- for…in statement
- for…of statement
for loop
This type of loop repeats until the condition returns as false.
do…while
This type of loop repeats until a specified condition evaluates to false.
while
This type of statement continues to function only if the value is true
labeled statement
This type of statement adds an id to the statement to add it somewhere else.
break statement
This type of statement to terminate and end a loop.
continued statement
This type of statement to restart a while, do-while, for, or label statement.
for…in statement
This type of statement to iterates a specified variable over all the enumerable properties of an object
for…of statement
This type of statement to make a loop Iterating over iterable objects including: Array, Map, Set, arguments ,object, etc. invoking a custom iteration hook with statements to be executed for the value of each distinct property.
Here’s more on this topic: Loop Examples and Tutorials