Setting Object.prototype.__proto__ instead of just Object.prototype?
问题 I am looking at this article regarding the node.js events module: http://www.sitepoint.com/nodejs-events-and-eventemitter/ And in it there is this code: Door.prototype.__proto__ = events.EventEmitter.prototype; Which supposedly sets the prototype of the Door object to the prototype of the event.EventEmitter. I believe I know what is the difference between prototype and proto but this code completely confuses me. So my questions is whether instead of using: Door.prototype.__proto__ = events