What’s wrong with using ‘var’ in JavaScript?
Using 'var' to declare variables can lead to scope leakage and silent errors in your code.
Using 'var' to declare variables can lead to scope leakage and silent errors in your code.
Learn the differences between the keywords var, let and const when declaring variables.
Learn the differences between 'const', 'let' and 'var' and when to use them.