super() on class that extends

Allen Wirfs-Brock allen at wirfs-brock.com
Sat Apr 11 02:59:40 UTC 2015


> On Apr 10, 2015, at 10:54 PM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
>> 
> 
> note totally true:

err, “not"
> 
> ```js
> class SubArray extends Array {
>    constructor(…args) {
>       let newObj = new Array(…args);
>       newObj.__proto__ = SubArray.prototype;  //or new.target.prototype
>       return newObj
>     }
>     subclassMethiod() {}
> }
> ```
> 
> Allen



More information about the es-discuss mailing list