constlet 声明
与 var
不同,const
/ let
与词法范围而非功能范围绑定。
{
var x = 1 // will escape the scope
let y = 2 // bound to lexical scope
const z = 3 // bound to lexical scope, constant
}
console.log(x) // 1
console.log(y) // ReferenceError: y is not defined
console.log(z) // ReferenceError: z is not defined