extends null
Axel Rauschmayer
axel at rauschma.de
Thu May 7 08:25:56 UTC 2015
Is this the best way to use `extends null`?
```js
class C extends null {
constructor() {
let _this = Object.create(C.prototype);
return _this;
}
}
```
You can’t use `this`, because it can’t be initialized via a super-constructor call: the super-constructor is `Function.prototype` (which can’t be constructor-called).
--
Dr. Axel Rauschmayer
axel at rauschma.de
rauschma.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150507/9934e43c/attachment.html>
More information about the es-discuss
mailing list