Stage 1 · Lesson 1 of 9
Values, types and equality
has a handful of simple , called : string, number, boolean, null, undefined, bigint and symbol. Everything else is an object, including arrays and functions. Declare values with const by default and let when you reassign; skip var.
Primitives are compared by value. Objects are compared by reference, meaning "is this the very same object?". So {} === {} is false, and that is exactly how React decides whether something changed.
Always use === rather than ==, which converts types first and makes 0 == '' true. Learn the oddities that cause real bugs: typeof null is 'object', NaN is not equal to itself, and 0.1 + 0.2 is not exactly 0.3.
A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock
Resources for this stage
Start with· follow one of these
- CoursePaidGrokking JavaScript Fundamentals
Design Gurus · Beginner · $50
Beginner JavaScript with an exercise after most lessons
- GuideFreeJavaScript.info
Ilya Kantor
Free and thorough: Part 1 is the language, skip the browser chapters in Part 2