What’s wrong with var? Well, a great many things, but is it really that bad? Kind of.
I can’t find any good reasons where var gives you a legitimate advantage over let or const. All other major languages use block scoping, and with the ES6 initiative to welcome a new class of developers who come from stricter, safer languages, the var keyword will only cause confusion. On top of that, the light restrictions of const will enforce better paradigms like functional, data-driven programming and immutable data structures.
...
Read more