Extended Object Literals to review

Michael Haufe tno at thenewobjective.com
Sat Mar 12 11:06:03 PST 2011


On Sat, Mar 12, 2011 at 11:02 AM, Allen Wirfs-Brock
<allen at wirfs-brock.com>wrote:
[...]
> class c {
>    <proto: s.prototype>
> }

> class c {
>    <superclass: s>
> }

> both are equivalent to:

> function c() {};
> c.prototype=Object.create(s.prototype);
[...]

So if "var b = new c", then "b.constructor" will be "s" instead of "c"?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110312/d12a54e6/attachment.html>


More information about the es-discuss mailing list