the javascript object model: strange constructor property

前端 未结 2 501
太阳男子
太阳男子 2021-01-06 04:16

I find the behaviour of this piece of code puzzling, why is the constructor of child not Child? Can someone please explain this to me?



        
2条回答
  •  盖世英雄少女心
    2021-01-06 05:14

    The "constructor" property is a reference to the function that created the object's prototype, not the object itself.

提交回复
热议问题