Loops Flashcards
1
Q
What is the synax for a do..while loop?
Why would we use it?
A
creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons followed by a block statement to be executed.
It’s useful because it will run the statement once regardless, afterward comes the check
2
Q
What is the syntax for a for loop?
When should we use it?
A
creates a loop that consists of three optional expressions, enclosed in parentheses and separated by semicolons followed by a block statement to be executed.