![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js学习笔记
liaotl10
A long and important road ahead.
展开
-
js学习笔记-对象
var xiaoming = { name: '小明', birth: 1990, school: 'No.1 Middle School', height: 1.70, weight: 65, score: null }; in: 检测对象是否拥有某一属性。继承得到的属性也可以检测到。 'name' in xiaoming //true '原创 2018-03-19 17:00:25 · 168 阅读 · 0 评论 -
javascript学习笔记-作用域
javascript没有块作用域 for(var i = 0;i < 10; i++){ } alert(i); //结果会输出10 ES6引入了关键字let. for(let i = 0;i < 10; i++){ } alert(i); //报错 Uncaught ReferenceError: i is not defined原创 2018-03-19 22:01:33 · 216 阅读 · 0 评论