Last active
September 24, 2018 06:47
-
-
Save przemyslawjanpietrzak/d8f58cc0bbcbf5fabb2179edc6804509 to your computer and use it in GitHub Desktop.
abstract-class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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