← Lesson
BitWithBite
Full-Stack · Quick Reference

Lesson 14 — Variables & Data Types Cheat Sheet

Full-Stack
In one line: const/let declare variables with block scope; JavaScript has six core data types; always compare with === not ==.

Key Ideas

1const. Can't be reassigned — the default choice.
2let. Can be reassigned, block-scoped.
3var. Function-scoped, legacy — avoid in new code.
4===. Strict equality — no type coercion.
5==. Loose equality — coerces types, causes bugs.

Six Data Types

number, string, boolean
Primitives
array, object
Reference types
undefined / null
Absence of value
0 == "0"
true (coerced)
0 === "0"
false (strict)