JavaScript Conditionals for Pythonistas (Fast Track) Quiz

Interactive Quiz ⋅ 10 Questions
By Stephen Gruppetta

In this quiz, you’ll test your understanding of JavaScript Conditionals for Pythonistas.

By working through this quiz, you’ll revisit how an else if chain keeps its result alive after the last branch, what an if without braces runs, where JavaScript’s ! and the ternary bind differently from Python’s not and conditional expression, how to write a range and a “not in” check, how to ask whether an object is empty, and what a switch compares its cases with.

Most questions show a short snippet ported from Python and ask what it does in JavaScript, or which version gives the same answer as the Python script. Good luck!

The quiz contains 10 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 smiling developer pulls an IF lever on a sorting machine that sends parcels down an ELSE chute or toward a SWITCH dial with CASE doors and a DEFAULT door.

Course

JavaScript Conditionals for Pythonistas (Fast Track)

Port a Python race-day script to JavaScript while writing else if chains, choosing values with the conditional operator, combining conditions with && and ||, checking ranges, and matching values with switch.

basics js py