Javascript-loops Flashcards
What is the purpose of a loop?
The purpose of loops is to repeat an action some number of times.
What is the purpose of a condition expression in a loop?
The purpose is to instructs the code to run a specified number of times.
What does “iteration” mean in the context of loops?
the same procedure is repeated multiple times.
When does the condition expression of a while loop get evaluated?
The condition is evaluated before executing the statement.
When does the initialization expression of a for loop get evaluated?
the first time when the loop runs.
When does the condition expression of a for loop get evaluated?
everytime the loop is run.
When does the final expression of a for loop get evaluated?
everytime the loop has run the statement in the curly braces.
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?
The increment operator (++) increments (adds one to) its operand and returns a value.
How do you iterate through the keys of an object?
for/in Statement.