He buscado muchas preguntas similares y ECMA262 2022 durante algunos días, pero aún no sé por qué.
let o const , ¿se creará un nuevo Registro de entorno y LE lo señalará?¿Tengo razón al pensarlo de la siguiente manera?
let a = 1 var b = 2 console.log(a) --------------------------- // Pseudo code: // which right? or other else global Execution Context = { VE: { bindings: b [[outerEnv]]: null }, // create a new ER whose [[outerEnv]] is null. then LE point to it. LE: { bindings: a [[outerEnv]]: null } }o
global Execution Context = { VE: { bindings: b [[outerEnv]]: null }, // create a new ER whose [[outerEnv]] is the original ER (which the unchangeable VE point to) // then LE point to it LE: { bindings: a [[outerEnv]]: VE } }