Skip to content

Instantly share code, notes, and snippets.

@conanak99
Last active Mar 9, 2016
Embed
What would you like to do?
class Animal {
constructor(name) {
this.name = name;
}
speak() {
console.log(this.name + ' makes a noise.');
}
}
class Dog extends Animal {
speak() {
console.log(this.name + ' barks.');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment