Variables and Data Types
JavaScript in Node.js supports let, const, and (legacy) var.
JavaScript
Core types
| Type | Example |
|---|---|
| string | 'hello' |
| number | 42, 3.14 |
| boolean | true |
| object | { id: 1 } |
| array | [1, 2, 3] |
| null / undefined | absence of value |
Prefer const by default; use let only when you need to reassign.