(obj)
| 1 | // 将传入的对象作为新对象原型 |
| 2 | function myCreate(obj) { |
| 3 | function F() {} |
| 4 | F.prototype = obj |
| 5 | return new F() |
| 6 | } |
| 7 | const obj1 = { p: 1 } |
| 8 | const obj2 = Object.create(obj1) |
| 9 | obj1.p = 2 |
nothing calls this directly
no outgoing calls
no test coverage detected