Async JavaScript for Pythonistas

Stephen Gruppetta 16 Lessons 2h 45m Updated intermediate js py

JavaScript’s async and await look so much like Python’s that a line-by-line port of asyncio code looks right. Port asyncio.gather(*(check_kiosk(b) for b in KIOSKS)), turn Python’s star into JavaScript’s spread, and Promise.all(...BRANCHES.map(checkKiosk)) stops with TypeError: object is not iterable before a single kiosk answers.

In this course, you’ll port a library’s morning holds check, which asks every branch’s kiosk at once, gives up on slow ones, and asks a failing kiosk again, with a function standing in for the kiosks so every example runs offline.

By the end of this course, you’ll be able to:

  • Port async def and await without asyncio.run(), and read the promise an async call returns
  • Await work in turn with for...of, or all at once with Promise.all()
  • Keep every outcome, failures included, with Promise.allSettled()
  • Give up on slow work with Promise.race(), and retry with try/catch around await
  • Handle a promise you await later
  • Port the whole holds check to JavaScript

You’ll need Python asyncio with async def, await, asyncio.run(), gather(), sleep(), and wait_for(), plus Node 26 and JavaScript functions, arrow functions, array methods, modules, try/catch, and reading files with await readFile(). The Python examples use Python 3.15.

The course mixes short videos and text lessons with exercises, a project that ports the whole holds check, and a quiz.

What’s Included:

  • 16 Lessons
  • Video Subtitles and Full Transcripts
  • Translated Subtitles in 8 Languages
  • 2 Downloadable Resources
  • Interactive Quiz to Check Your Progress
  • 4 Hands-On Coding Exercises
  • Q&A With JavaScript Experts: Ask a Question
  • Certificate of Completion

Downloadable Resources:

Related Learning Paths:

Project: Ashdown Libraries' Holds Check

2 Lessons 22m

  1. 1. Porting the Holds Check04:56
  2. 2. Exercise: Finish the Holds Check18:00

About Stephen Gruppetta

Stephen obtained a PhD in physics and worked as a physicist in academia for over a decade before becoming a programming educator. He's constantly looking for simple ways to explain complex things.

» More about Stephen

← Browse All Courses