Do for a badge #697
|
What is the difference between let, const, and var in JavaScript? |
Answered by
jnelbaylen
Mar 23, 2025
Replies: 1 comment
|
var: Function-scoped, can be re-declared and updated. let: Block-scoped, can be updated but not re-declared in the same scope. const: Block-scoped, cannot be re-declared or updated. |
0 replies
Answer selected by
mockrator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
var: Function-scoped, can be re-declared and updated.
let: Block-scoped, can be updated but not re-declared in the same scope.
const: Block-scoped, cannot be re-declared or updated.