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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly