Prototypes as the new class declaration

Axel Rauschmayer axel at
Mon Jun 20 03:25:20 PDT 2011

>> It seems to me it would occur when in an ObjectLiteral where a function expression is assigned as the initial value of a 'constructor'-named PropertyAssignment.
> correct, whatever magic there is occurs as part of defining a "constructor" property as part of an object literal.  However, such things could still be wired up manually (most likely by somebody wanting to create procedural abstractions for class-like definitions.

Are you thinking along the lines of the following example?
    var MyClass = class({ ... });

Dr. Axel Rauschmayer

axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list