Python’s in compares a record’s contents, so a resent reading is easy to skip. Port the co-op’s if reading in seen: as if (seen.includes(reading)), and JavaScript compares the records by identity instead: the resent reading prints twice, and the check counts four readings instead of three, with no error.
In this course, you’ll port a weather co-op’s Python script, which checks each hour’s readings from four home weather stations before they go on the website, to JavaScript.
By the end of this course, you’ll be able to:
- Compare records by the fields that identify them, and see why strings and numbers compare by value
- Check a value’s type when
typeofsays"object", and an object’s class withinstanceof - Read the rules
==follows, and write the check with===instead - Choose between
===andObject.is()whenNaNor-0is involved - Port the whole readings check to JavaScript
You’ll need Python’s ==, is, and isinstance(), and what mutability means, plus Node 26 and the JavaScript basics: const and let, ===, typeof, functions, arrays, objects, and null and undefined. The Python examples use Python 3.15.
The course mixes short videos and text lessons with exercises, a project that ports the whole readings check, and a quiz.
What’s Included:
- 15 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: