I read an 
article<http://stackoverflow.com/questions/6276581/prototype-chain-cant-get-object>which
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 then try .construtor.propotype.constructor.propotype. Untill it
find the built-in Object().

But I test this:

 function a() {}
 b = new a();
 c = b.constructor.prototype

I get an empty a object.

 d = c.constructor.prototype

I get an empty a object.

It loops. No matter how many .constructor.prototype I call, it can't find
Object(). What's wrong? Do I misunderstand the prototype chain?



--
Lai, Yu-Hsuan

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to