let:定义变量

先定义在使用,变量不提升,块级的作用域,不会 成为属性。

示例:

var let和const关键字的使用

而var就不会报错

var let和const关键字的使用

let的作用域:

var let和const关键字的使用

let和var最主要区别

var let和const关键字的使用var let和const关键字的使用

const 常量

声名定义须同时 禁止重定义值 常量名称用大写

var let和const关键字的使用        var let和const关键字的使用    

参考:http://v.qq.com/x/page/g0814e8xtrx.html

 

相关文章: