javascript · level 1 check
a tiny quiz game.
Time to build a real game! Your quiz asks three questions, one after another. It checks each answer, keeps score, and tells the player how they did at the end.
The questions and answers live in two arrays, side by side. The function `ask` asks one question with `prompt` and returns `true` if the answer is right, or `false` if not. A `for` loop counts through the indexes, so `questions[i]` and `answers[i]` always match up.
Be kind to your player: `PARIS`, `paris` and `Paris` with extra spaces should all count as right. Fill in each `____`, run it, then play your own quiz.
Fill in every ____ then run the checks.
- 1 It checks every answeruses: loops
- 2 It accepts any capitalsuses: text tricks
- 3 It ignores extra spacesuses: text tricks
- 4 It counts the score correctly when some answers are wronguses: variables
- 5 It tells the player the right answeruses: template literals
- 6 It only cheers for a perfect scoreuses: decisions
Take as long as you like and try as many times as you want.
javascript · level 1 · easy
level up.
You passed every check. Your face is now :D, and Level 2 gets you B).
- 28 lessons in this level
- 6 of 6 checks passed
This pass isn’t saved. A free account keeps your new face.