Recognize JavaScript primitive values and objects.
- string
- number
- boolean
- null
- undefined
- object
- typeof
Primitives include strings, numbers, booleans, bigint, symbol, null, and undefined. Objects hold collections and functions. typeof helps inspect a value, but typeof null is a historical special case returning object.
A missing property yields undefined, which is different from a deliberately assigned null.
Create one value of each common type and print typeof and a short explanation.
Open example.html in a browser and edit example.js. Save, refresh, and use the Console and debugger to inspect values.
- Explain the core idea in your own words without reading the code.
- Change one input and predict the output before running it.
- Test one boundary or failure case, then record what you changed.