[JSMentors] Prototype chain can't get Object() ?

2011-06-08 Thread Raincole Lai
I read an articlehttp://stackoverflow.com/questions/6276581/prototype-chain-cant-get-objectwhich explains what prototype chain is. It says that if I try to access an object's property but it doesn't have it, javascript engine will try it's .constructor.propotype. If it doesn't have it either

Re: [JSMentors] Prototype

2010-12-29 Thread Lasse Reichstein
On Wed, 29 Dec 2010 08:25:33 +0100, Emeka emekami...@gmail.com wrote: Is Prototype JavaScript's way of solving Expression Problem? And what is really the difference between __proto__ and Prototype? That depends on what you mean by Prototype. The internal [[Prototype]] link of objects is a way

Re: [JSMentors] Prototype

2010-12-29 Thread Sergio Cinos
I would add: To set the prototype of an object, you modify the 'prototype' property of its constructor function. To get access to the prototype you can use myFunction.prototype or myInstance.__proto__. //Constructor function var myFunction = function() { /*...*/ } myFunction.prototype.myProperty

Re: [JSMentors] Prototype

2010-12-29 Thread Peter van der Zee
On Wed, Dec 29, 2010 at 8:25 AM, Emeka emekami...@gmail.com wrote: Is Prototype JavaScript's way of solving Expression Problem? And what is really the difference between __proto__ and Prototype? Heh, I can't really find my own explanation in the archives, but it's interesting where a google