Skip to content

Instantly share code, notes, and snippets.

@conanak99
Last active March 9, 2016 00:51
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 conanak99/e9331b577c43b4b4c7ef to your computer and use it in GitHub Desktop.
Save conanak99/e9331b577c43b4b4c7ef to your computer and use it in GitHub Desktop.
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