Updated version of this blog post: Chapter “Variables and scoping” in “Exploring ES6”. This blog post examines how variables and scoping are handled in ECMAScript 6 [1]. Block scoping via let and const # Both let and const create variables that are block-scoped – they only exist within the innermost block that surrounds them. The following code demonstrates that the let-declared variable tmp only