On Oct 13, 2011, at 12:23 PM, John J Barton wrote: > If I get this right then: > > var Result = {prototype: aPrototype, foo: baz} <| function aTempFunction() > { this.a = 'b';}; > var aResult = new Result(); > > gives me {a:'b', __proto__:{__proto__:aPrototype} } > > Is it true? What happened to 'foo'?
'foo' is a property of the aTempFunction.__proto__ (to keep rolling with your naughty __proto__ usage ;-). It's a "class property" or "class static" or "class-side inherited property". > Couldn't I just say: > var aResult = aPrototype <| {a: 'b'}; Sure, if you wanted a one-off and not a constructor with an inherited class property 'foo'. /be _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss