Up until ES6, you couldn't achieve true block scoping in JavaScript. With the `var` keyword, the scope in a code block could be accessed in the global scope.