π const keyword:
-> Block scoped.
-> Can't be updated nor re-declared.
-> Hoisted at top of the scope. Even though it is hoisted, const variable is not initialized.
-> Need to declare const variable at initialization.
π var keyword:
-> Global scoped or function scoped.
-> Can be updated and re-declared in it's scope.
-> Hoisted at top of the scope. It is initialized with undefined.
-> Can be declared without initialization.
If you like this information, kindly RT.
ProgrammingTips | Become better Software Engineer retweeted
Web Development is an enormous field that makes it difficult for many beginners.
Here I covered everything that will help you to start with almost zero efforts π§΅ππ»