extends null

Claude Pache claude.pache at gmail.com
Thu May 7 09:54:39 UTC 2015


> Le 7 mai 2015 à 10:25, Axel Rauschmayer <axel at rauschma.de> a écrit :
> 
> Is this the best way to use `extends null`?
> 
> ```js
> class C extends null {
>     constructor() {
>         let _this = Object.create(C.prototype);
>         return _this;
>     }
> }
> ```

No, you should say: `Object.create(new.target.prototype)`

—Claude



More information about the es-discuss mailing list