Confusion over var, let and const #2
Answered
by
AdyaTech
TheDevMind
asked this question in
Q&A
-
|
Can someone explain the difference between var, let and const? |
Beta Was this translation helpful? Give feedback.
Answered by
AdyaTech
Jun 19, 2026
Replies: 1 comment
-
|
var is function-scoped and can be redeclared. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
TheDevMind
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
var is function-scoped and can be redeclared.
let is block-scoped and can be reassigned.
const is block-scoped and cannot be reassigned after initialization.