Created
April 21, 2018 05:33
-
-
Save ctsstc/dd39345e611a52b2579fa0b379d972c8 to your computer and use it in GitHub Desktop.
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
class Animal { | |
static emote() { | |
let className = this.name;//this.constructor.name; | |
debugger | |
let emote = className == 'Animal' ? 'Cannot call emote() directly from Animal class' : `${className} does not implement execute()`; | |
console.log(emote); | |
return emote; | |
} | |
} | |
class Cat extends Animal { | |
static get namee() { return 'Catz'; } | |
static emote() { | |
return `meow i am ${super.name}`; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment