ES6 系列之 let 和 const

块级作用域的出现 通过 var 声明的变量存在变量提升的特性: {代码...} 初学者可能会觉得只有 condition 为 true 的时候,才会创建 value,如果 condition 为 false,结果应该是报错,然而因为变量提升的原因,代...