Skip to content

Instantly share code, notes, and snippets.

@khyperia
Created May 15, 2019 20:01
Show Gist options
  • Save khyperia/4dd91e5e474a507b20eb27977efa72b1 to your computer and use it in GitHub Desktop.
Save khyperia/4dd91e5e474a507b20eb27977efa72b1 to your computer and use it in GitHub Desktop.
class B {
constructor(x) {
console.log(x);
}
}
class C extends B {
}
new C("C"); // prints "C"
class D extends B {
asdf = 2;
}
new D("D"); // prints undefined :'(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment