Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 256 Bytes

constants.md

File metadata and controls

11 lines (8 loc) · 256 Bytes

Constants

Immutable symbols. A constant must be initialised unlike a variable

const card = 42;
...
card = 45; //TypeError: Assignment to constant variable.

A constant is read-only and is used in cases where a value should not change