← BYTES
JavaScript·Starter·Ref: 3.1.16
What is the purpose of the `const` keyword?
Have a question about this video? Mention reference 3.1.16 when you contact us.
a.Declares a variable whose underlying value can never be modified in any way
b.Declares a global constant accessible from any file automatically
c.Declares a block-scoped variable whose binding (reference) cannot be reassigned after initialization
d.Declares a variable that is automatically frozen with Object.freeze()
`const` prevents REASSIGNING the variable binding itself, but if that binding holds a mutable object or array, its contents can still be changed (`const arr = []; arr.push(1);` is legal) -- const is about the binding, not deep immutability.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES3116#JavaScript