let name = "Lydia";
function getName() {console.log(name);
let name = "Sarah";
}
getName();
A: Lydia
B: Sarah
C: undefined
D: ReferenceError
参考答案:
let name = "Lydia";
function getName() {console.log(name);
let name = "Sarah";
}
getName();
A: Lydia
B: Sarah
C: undefined
D: ReferenceError
参考答案: