javascript-loops Flashcards
What is the purpose of a loop?
To perform something over and over so you don’t have to write code for again.
What is the purpose of a condition expression in a loop
So a loop doing go on infinitely and knows when to stop
what does iteration mean in the context of loops.
Each cycle of a loop
When does the condition expression of a while loop get evaluation
Evaluated before each loop
When does the initialization expression of a for loop get evaluated?
Once before the loop begins
When does the condition expression of a for loop get evaluated?
Before each loop iteration
When does the final expression of a for loop get evaluated?
At the end of the loop iteration, before the condition is evaluated again.
Besides a return statement, which exits its entire function block, which keyword exits a loop before its condition expression evaluates to false?
break
What does the ++ increment operator do?
Increment the variable by 1
How do you iterate through the keys of an object?
for in statement