A `const` declaration creates a block-scoped binding that must be initialized and cannot be reassigned. Its scope is determined by the nearest enclosing block, such as a function body or standalone block. section 7.3.2 section 7.3.1
console.assert(x === 1, "x is 1"); const x = 1;
This reference reads `x` before its `const` declaration executes, so it triggers a temporal-dead-zone error. section 7.3.2
Scope alone does not make a binding ready to use: execution order matters. A function may refer to `x` before its declaration in the code, provided the function runs only after `x` is initialized. section 7.3.2










