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   ·   1350 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 17:03 · PVG 01:03 · LAX 10:03 · JFK 13:03
♥ Do have faith in what you're doing.