📖
Data Types
Discover what types of information exist in JavaScript
JavaScript distinguishes different data types — different kinds of information. Like the difference between the number 42 and the text 'hello'.
javascript
💬
Different data types for different kinds of information.
🗂️
Types like different shelves
Imagine a wardrobe with shelves: one shelf holds numbers (1, 2, 3...), another — text (words), another — light switches (true/false). The computer always knows where things belong, thanks to types.
The `typeof` command shows the type of a variable. For example: typeof 42 → 'number', typeof 'hello' → 'string'