0
In JavaScript what is Difference between var, let and Const
Var x; let x; const x; What is Difference between this above keywords
3 Answers
+ 6
var declarations are globally scoped or function scoped while let and const are block scoped. var variables can be updated and re-declared within its scope; let variables can be updated but not re-declared; const variables can neither be updated nor re-declared. They are all hoisted to the top of their scope.
Better understanding with examples =>https://codeburst.io/learn-let-var-and-const-in-easiest-way-with-guarantee-e6ecf551018a
+ 2
A nice topic about this:
https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/