feipeng's recent timeline updates
feipeng

feipeng

V2EX member #290947, joined on 2018-02-09 14:22:59 +08:00
feipeng's recent replies
自己想通了==
```
function Person(){
this.name = "张三";
}
let person = new Person();
person.age = 12;
```
上面的 person 就是一个非 plain object,person 的__proto__为 Person,在使用 for in 遍历复制之后的对象的__proto__却变成了 Object,显然复制前后不对等,故要使用 isPlainObject 方法进行过滤
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2712 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 33ms · UTC 03:34 · PVG 11:34 · LAX 20:34 · JFK 23:34
♥ Do have faith in what you're doing.