Prototypal inheritance in JavaScript

后端 未结 4 1811
不知归路
不知归路 2021-02-03 13:31

I\'ve been watching Douglas Crockford\'s talks at YUI Theater, and I have a question about JavaScript inheritance...

Douglas gives this example to show that \"Hoozit\" i

4条回答
  •  醉梦人生
    2021-02-03 13:59

    If he writes Hoozit.prototype = Gizmo.prototype any modfication he makes later to the prototype of Hoozit will be reflected in the prototype of Gizmo.

提交回复
热议问题