Javascript-loops Flashcards
What is the purpose of a loop?
to check conditions though items in an array
What is the purpose of a condition expression in a loop?
is the expression to be evaluated before the each loop iteration. when it is true then the statement is executed
What does “iteration” mean in the context of loops?
everytime it goes though the loop
When does the condition expression of a while loop get evaluated?
before each time it run
When does the initialization expression of a for loop get evaluated?
before the loop starts
When does the condition expression of a for loop get evaluated?
after initialization
When does the final expression of a for loop get evaluated?
at the each loop & then code block
Besides a return statement, which exits its entire function block, which keyword exits a loop before its condition expression evaluates to false?
break keyword
What does the ++ increment operator do?
add the operant & reassign it
How do you iterate through the keys of an object?
for in loop