Subj : Re: define prototype in rhino To : netscape.public.mozilla.jseng From : Martin Honnen Date : Mon Nov 29 2004 06:47 pm Michael Borgwardt wrote: > In prototype-based OO, there are no classes. Instead, any object can serve > as a "prototype" for creating new objects, which is done by cloning the > prototype with its complete state and behaviour. The prototype is not cloned, there is a prototype chain and a newly created object is hooked up to that prototype chain, and when a property is looked up then the lookup walks the prototype chain to find the property. That way an object "inherits" the properties the objects in its prototype chain have. -- Martin Honnen http://JavaScript.FAQTs.com/ .