Loops and Terminal Input Quiz

Interactive Quiz ⋅ 12 Questions
By Martin Breuss

In this quiz, you’ll revisit Loops and Terminal Input. You’ll trace when a loop checks its condition, follow a counter through its passes, tell break from continue, plan a program before you type it, and spot what goes wrong when a terminal question is asked in the wrong place.

Most questions show a short piece of JavaScript and ask what it prints or what happens when you run it. Others ask you to complete a loop or pick the plans and loops that do the job.

The quiz contains 12 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!

Related Resources

A developer types a guess at a terminal console beside a loop machine with numbered tokens on a ring labeled WHILE, a BREAK lever, and HIGHER and LOWER feedback panels.

Course

Loops and Terminal Input

Make your programs repeat with while and for loops, leave a loop early with break and continue, plan before you code, and ask questions in the terminal as you build a secret-code guessing game in Node.

basics js node