Ques:- What is the difference between var let and const in JavaScript
Asked In :-
Ziffity Solutions, Hummingbird Web Solutions, Itobuz Technologies, Aakit Technologies, Codiant Software Technologies, Priya Softweb Solutions, Walstar Technologies, Sun Technology Integrators, Spectra Medix India, Webvillee Technology,
Right Answer:
`var` is function-scoped or globally-scoped and can be re-declared and updated. `let` is block-scoped, can be updated but not re-declared in the same scope. `const` is also block-scoped, cannot be updated or re-declared, and must be initialized at the time of declaration.
`var` is function-scoped or globally-scoped and can be re-declared and updated. `let` is block-scoped, can be updated but not re-declared in the same scope. `const` is also block-scoped, cannot be updated or re-declared, and must be initialized at the time of declaration.