Guest User

Untitled

a guest
Jun 19th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class A {
  2. constructor() {}
  3. }
  4.  
  5. function B() {
  6. // what do I put here? I would do something like
  7. // A.prototype.constructor.call(this) but that throws an error saying the
  8. // constructor can only be called with `new`
  9. }
  10. B.prototype = Object.create(A.prototype);
Add Comment
Please, Sign In to add comment