What are the differences between 'let', 'const', and 'var' in variable declaration?
varis function-scoped, whileletandconstare block-scoped.varallows variable hoisting, meaning it can be used before declaration, whileletandconstdo not.letallows reassignment,constis for constants that cannot be reassigned.- Variables declared with
constmust be initialized during declaration.