The JavaScript Object Model: Properties, Descriptors, and Freezing

Stephen Gruppetta 17 Lessons 2h 43m Updated advanced js py

A Python class with a read-only @property ports line for line to a JavaScript class with a getter, and card.id still gives P-17. But pass the card to JSON.stringify(), and the export has the private _id field and no id field at all, because the getter isn’t one of the card’s own properties.

In this course, you’ll port a print shop’s Python script, which exports the proof cards it sends customers before a print run, to JavaScript.

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

  • Tell an object’s own properties from the defaults it inherits, with Object.hasOwn() and Object.create()
  • Set a property’s flags on purpose with Object.defineProperty(), and read them back with its descriptor
  • Choose between a live getter and a snapshot of its value when you copy an object
  • Tag an object with a symbol, and know which listings show it
  • Choose an integrity level with Object.freeze(), Object.seal(), or Object.preventExtensions(), knowing each one is shallow
  • Port the whole proof card export to JavaScript

You’ll need to know how Python’s attribute lookup uses an instance’s __dict__ and its class, how @property, __slots__, and copy.copy() behave, and read-only mappings such as MappingProxyType. In JavaScript, you’ll need Node 26 and classes with getters and setters, object literals, spread, Object.keys(), JSON.stringify(), delete, and try…catch. The Python examples use Python 3.15.

The course mixes short videos and text lessons with exercises, a project that ports the whole proof card export, 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:

Getting Started

1 Lesson 1m

  1. 1. Welcome to the Print Proof Cards01:53

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