Skip to content

Instantly share code, notes, and snippets.

@przemyslawjanpietrzak
Last active September 24, 2018 06:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save przemyslawjanpietrzak/d8f58cc0bbcbf5fabb2179edc6804509 to your computer and use it in GitHub Desktop.
Save przemyslawjanpietrzak/d8f58cc0bbcbf5fabb2179edc6804509 to your computer and use it in GitHub Desktop.
abstract-class
abstract class AbstractClass {
method() {
return 42
}
}
class Class extends AbstractClass {
method1() {
return 42;
}
}
const instance = new AbstractClass(); // Cannot create an instance of an abstract class.
const instance1 = new Class();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment