Courses / JavaScript
33. const Declaration
Declaring block-scoped constants with immutable bindings using const.
1 min read Chapter 33 of 99
JavaScript
const Declaration
A way to create a variable binding that can't be reassigned and is limited to the block where it's defined.
"I want to prevent accidental reassignment of important values like configuration or references."
const creates a block-scoped binding whose identifier cannot be reassigned; the value it points to can be mutable if it's an object or array.
"I want to prevent accidental reassignment of important values like configuration or references."
const creates a block-scoped binding whose identifier cannot be reassigned; the value it points to can be mutable if it's an object or array.