The following code got this error: ReferenceError: aa is not defined. Why not print '2' ?
var aa = 2;
function run() {
console.log(aa);
let aa = 4
}
run()
The following code got this error: ReferenceError: aa is not defined. Why not print '2' ?
var aa = 2;
function run() {
console.log(aa);
let aa = 4
}
run()