摘要:
函数预编译过程this-window 全局作用域this->window call/applay改变this指向 function Person(name,age,sex){ this.name=name; this.age=age; this.sex=sex; } function Xiaomin 阅读全文
摘要:
遍历对象 循环的大小为自己属性的大小,不会计算系统隐藏属性, 判断自身属性hasOwnProperty in 判断可不可以访问这个属性 if ("name" in deng) { console.log("true"); } else { console.log("false"); } instan 阅读全文
摘要:
在zhang["name"]其实内部调用了zhang.name,所以从本质上来说zhang["name"]执行更快,不过我们一般为了方便都是zhang.name,但是zhang["name"]用起来更灵活 阅读全文
摘要:
对象中return this实现方法的连续调用 阅读全文