A quick overview of new JavaScript features in ES2015, ES2016, ES2017, ES2018 and beyond. Let function fn () { let x = 0 if (true) { let x = 1 // only inside this `if` } } Const const a = 1 let is the new var. Constants work just like let, but can’t be reassigned. See: Let and const