In the JavaScript curriculum, what is the difference between let and const regarding reassignment? #1868
Answered
by
isthatpratham
AMMIYO PAUL (ammiyo)
asked this question in
Q&A
Replies: 1 comment
|
let allows you to reassign the variable to a new value later in the code. const creates a read-only reference, meaning you cannot reassign the variable identifier itself after initialization (though objects/arrays assigned to const can still be mutated) |
0 replies
Answer selected by
ammiyo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
let allows you to reassign the variable to a new value later in the code. const creates a read-only reference, meaning you cannot reassign the variable identifier itself after initialization (though objects/arrays assigned to const can still be mutated)