ES6 系列之 let 和 const

2018-05-21
阅读 5 分钟
6.2k
初学者可能会觉得只有 condition 为 true 的时候,才会创建 value,如果 condition 为 false,结果应该是报错,然而因为变量提升的原因,代码相当于: