Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- constructor() {}
- }
- function B() {
- // what do I put here? I would do something like
- // A.prototype.constructor.call(this) but that throws an error saying the
- // constructor can only be called with `new`
- }
- B.prototype = Object.create(A.prototype);
Add Comment
Please, Sign In to add comment