The Millbrook Valley Weather Co-op’s readings check now runs in JavaScript. readings-check.js prints the same six lines as readings_check.py. It skips the resent ridge reading, rejects school’s, and marks orchard’s failed thermometer as unchanged, because Object.is(NaN, NaN) is true.
Along the way, you’ve learned to:
- Compare records by the fields that identify them
- Explain why primitives compare by value and how strings and numbers still get methods
- Pair
typeofwith the checks it can’t make - Check an object’s class with
instanceof, and negate the check safely - Read
==by its rules, and replace it safely - Choose between
===andObject.is()
Each of these came from a Python habit that needed a second look.