JS Flashcards
What is the purpose of a loop?
For repetition
What is the purpose of a condition expression in a loop?
to set a condition of when the loop should stop
What does “iteration” mean in the context of loops?
Iteration means the loop completes a cycle
When does the condition expression of a while loop get evaluated?
before each iteration
When does the initialization expression of a for loop get evaluated?
before the condition
When does the condition expression of a for loop get evaluated?
before each iteration
When does the final expression of a for loop get evaluated?
at the end of each loop iteration
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?
increase by one
How do you iterate through the keys of an object?
for in loop