Courses / JavaScript
32. let Declaration
Declaring block-scoped mutable variables using let.
1 min read Chapter 32 of 99
JavaScript
let Declaration
A way to declare variables that are mutable but confined to the nearest block (curly braces).
"I need a variable I can change inside a loop or block without it leaking outside."
let creates a variable you can reassign whose scope is limited to the enclosing block, statement, or expression.
"I need a variable I can change inside a loop or block without it leaking outside."
let creates a variable you can reassign whose scope is limited to the enclosing block, statement, or expression.