AI Hints
Home›JavaScript Tutorial›Practice: Control Flow
JavaScript · Lesson 30 of 138

Control Flow Quiz

Test yourself.

⏱ 2 min read▶ Video at 36:02🎓 Free
Watch this lesson in the JavaScript courseWatch on YouTube ↗Full JavaScript course

Let's check your control flow skills. Pause before each answer.

Control Flow Quiz
From the video: Control Flow Quiz
  • Five questions
  • Pause and think
  • Then listen

Question 1

Which of these values is falsy? The answer is zero.

Quick check
Which is falsy?

Question 2

In an if, else if chain, which block runs? The answer is the first one whose condition is true.

Quick check
Which block runs?

Question 3

What does two ampersands mean? The answer is and. Both sides must be true.

Quick check
&& means?

Question 4

Which keyword skips to the next round of a loop? The answer is continue.

Quick check
Skip to the next round?

Question 5

What happens if you forget break in a switch case? The answer is, the code falls through into the next case.

Quick check
No break in a case?

Summary

Well done. Next, a new section, functions, the most important building block in JavaScript.

Key takeaways
  • Falsy values
  • First true wins
  • break and continue
Next up: Functions — reusable code