/** * use let to define block */ { let fruit = 'apple'; } console.log(fruit); //wrong
block 是“块”,跳出这个范围将不再适用。