function nodeSimplified() {
var a =10;
console.log(a); // 输出 10
if(true) {
var a=20;
console.log(a); 输出 20
}
console.log(a); 输出 20
}
nodeSimplified() {
let a =10 output 10
) {
let a=20 output 20
output 10
}
;
let a =20; 抛出语法错误
console.log(a);
}
nodeSimplified() {
;
var a =20;
console.log(a); 输出 20
}
const a = 10;
nodeSimplified() {
const MY_VARIABLE =10;
console.log(MY_VARIABLE); 输出 10
}
输出 10
MY_VARIABLE =20; 抛出类型错误
console.log(MY_VARIABLE);
}