Created
September 17, 2015 23:24
-
-
Save ulisesrmzroche/fb240c67a84bd6d6e7e1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Vegetable { | |
constructor(name) { | |
this.name = name; | |
} | |
sayHey(){ | |
console.log("Sup' I'm a #{@name}") | |
} | |
} | |
class Tomato extends Vegetable { | |
constructor(){ | |
this.name = "Tomato" | |
} | |
} | |
tomato = new Tomato; | |
tomato.sayHey(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment