JavaScript•6 min read
Variables and Types
C
Coding Dimension
Aug 11, 2026
Learn let, const, var and JavaScript’s primitive types.
Why variables matter
Variables store values your program can reuse. In modern JavaScript you almost always use const or let.
const vs let
const appName = "Coding Dimension";
let visitCount = 0;
visitCount += 1;
- const — binding cannot be reassigned
- let — binding can be reassigned
- var — legacy; avoid in new code
Primitive types
Common primitives: string, number, boolean, null, undefined, bigint, symbol.
Use typeof to inspect a value quickly during learning and debugging.
Last updated on 8/11/2026
