JavaScript Classes for Pythonistas

Stephen Gruppetta 17 Lessons 2h 53m Updated intermediate js oop py

A JavaScript class looks so much like a Python class that you’ll want to port it line by line. Make the pool’s first pass with Pass("Priya Nair"), as you would in Python, and JavaScript stops with TypeError: Class constructor Pass cannot be invoked without 'new'.

In this course, you’ll port Riverside Pool’s Python booking module, with its casual swims, ten-swim cards, memberships, and two-lane early-morning session, to JavaScript.

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

  • Port a class to constructor and this, and a dataclass to fields and a constructor
  • Keep state private in # fields behind get and set, and share prices and factories with static
  • Extend a class with extends and super(), and print instances with toString()
  • Copy instances without losing their class, and pass methods as callbacks without losing this
  • Port the whole pool passes module to JavaScript

You’ll need Python classes with __init__() and methods, @property, @classmethod and @staticmethod, inheritance with super(), and dataclasses, plus Node 26 and the JavaScript for functions, arrow functions, callbacks and options objects, copying data with structuredClone() and JSON, and throwing errors. The Python examples use Python 3.15.

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

What’s Included:

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

Downloadable Resources:

Related Learning Paths:

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