模拟环境
// 如何判断原型链上重复的属性 // 模拟一个原型链 Baz => Bar => Foo => FooProto => Object => null const FooProto = { ak: 1 } const Foo = Object.create(FooProto) Foo.ak = 2 Foo.aj = 4 const Bar = Object.create(Foo) Bar.ak = 3 Bar.aj = 5 Bar.am = 7 const Baz = Object.create(Bar)
"如何判断原型链上重复的属性?"继续阅读