Sunday, July 27, 2014

Previous Interview Question Next Interview Question
Home

__proto__ VS. prototype in Object Oriented JavaScript

__proto__ is the actual object that is used in the lookup chain to resolve methods, etc.

prototype is the object that is used to build __proto__ when you create an object with new:
( new Foo ).__proto__ === Foo.prototype
( new Foo ).prototype === undefined

Previous Interview Question Next Interview Question
Home

0 comments :

Post a Comment