javascript-while Flashcards

1
Q

What is the purpose of a loop?

A

repeat the same, or similar, code a number of times. Lets you repeat functionality based on the code block within loop,.

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

Why might there be different kinds of loops?

A

Because you may be unsure how many times you want to run the loop.

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

What is the purpose of a conditional expression as it relates to loops?

A

It sets the amount of times the loop will run.

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

Could a loop potentially go on forever?

A

Yes, depending on the condition.

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

Could a loop never start?

A

Yes, depending on the condition.

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