📅  最后修改于: 2022-03-11 15:01:13.505000             🧑  作者: Mango
let x = 10;
if (x == 10) {
let x = 20;
console.log(x); // 20: reference x inside the block
}
console.log(x); // 10: reference at the begining of the script
Code language: JavaScript (javascript)