1. Object.is(v1, v2)
* 判断2个数据是否完全相等
console.log(Object.is('abc', 'abc'));//true console.log(NaN == NaN);//false console.log(Object.is(NaN, NaN));//true
2. Object.assign(target, source1, source2..)
* 将源对象的属性复制到目标对象上
et obj = {name : 'kobe', age : 39, c: {d: 2}}; let obj1 = {}; Object.assign(obj1, obj); console.log(obj1, obj1.name);
3. 直接操作 __proto__ 属性
let obj2 = {};
obj2.__proto__ = obj1;
let obj3 = {name : 'anverson', age : 41}; let obj4 = {}; obj4.__proto__ = obj3; console.log(obj4, obj4.name, obj4.age);