如果两个构造函数的prototype都指向同一对象,那么这个对象的construtctor 会指向哪个构造函数?
Fn1 ->prototype->obj
so obj.constructor=Fn1;
Fn2->prototype->obj
will obj.constructor=Fn2 ?
what is obj.constructor? Fn1 or Fn2?
Fn1 ->prototype->obj
so obj.constructor=Fn1;
Fn2->prototype->obj
will obj.constructor=Fn2 ?
what is obj.constructor? Fn1 or Fn2?
2022-02-22
举报