Lesson 3 of 55 · javascript
Data Types & Type‑Coercion
Duration: 10 mins
Primitive types:
Number– all numbers are floating point (NaN,Infinity).StringBooleannull– intentional absence of any value.undefined– uninitialised.Symbol– unique identifiers.BigInt– arbitrarily large integers.
Objects, arrays and functions are reference types.
Example: Type coercion pitfalls
'5' + 3 // "53" (string concatenation)
'5' - 3 // 2 (numeric subtraction)
true + 1 // 2 (true → 1)