Welcome to Porting Python’s Defaults and match Statements to JavaScript. You’ll move Nadia’s community-center booking confirmations from Python to JavaScript. A line-by-line port can run successfully and still produce a different confirmation, as Sam Ortiz’s request from last month shows.
By the end, you’ll be able to:
- Pick values and choose defaults for booking data.
- Fill in requests.
- Port guarded and patterned decisions from Python’s
match. - Call available notice functions.
- Port the booking confirmations script.
You should know Python’s or, and, conditional expressions, and match. You should be able to write small JavaScript programs with objects, Maps, arrays of objects, and arrow functions. You should also know ??, ?., else if, the conditional operator, and switch.
Use a current Node installation. The examples use Node 26 and Python 3.15.
Short videos mix with text lessons and exercises. Every video has a summary below it. A quiz and a summary close the course.
Next up: Picking a Value With || and &&, starting from Nadia’s booking form.