ES6: let and cons
var
in JavaScript does not work particularly well, it confuses the heck out of beginners with it’s scope and the fact that it’s used everywhere for all concepts including constants make it difficult to identify the intent of each defined variable. ES6 introduces some new keywords that is easier to understand in terms of both scope and intent.