JavaScript's Type System Under the Hood

Stephen Gruppetta 13 Lessons 1h 59m Updated advanced js py

In Python, __str__() decides how an object prints. Port that to a toString() method, log a reading with console.log(reading), and you get Reading { celsius: 21 } instead of the 21 C label. Logging, formatting, and arithmetic each turn an object into a value their own way in JavaScript.

In this course, you’ll port a museum gallery’s temperature display, whose Reading class keeps each reading’s number and label apart.

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

  • Explain where a primitive value’s methods live, such as a string’s .toUpperCase()
  • Trace how JavaScript turns an object into text or a number with valueOf() and toString()
  • Read the specification’s conversion steps for a few values
  • Handle all three conversion hints with Symbol.toPrimitive
  • Port the gallery formatter to JavaScript

You’ll need Python’s data model, where dunder methods such as __str__() and __float__() drive conversions. You’ll also need Node 26 and JavaScript classes with constructor, this, and toString(), plus typeof, ===, and converting with String(), Number(), and Boolean(). The Python examples use Python 3.15.

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

What’s Included:

  • 13 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:

Getting Started

1 Lesson 1m

  1. 1. Welcome to the Gallery Readings01:57

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