Skip to content

Instantly share code, notes, and snippets.

@codemilli
Last active April 7, 2016 08:44
Show Gist options
  • Save codemilli/262dbd3c5ff53908b1f008948c4246e8 to your computer and use it in GitHub Desktop.
Save codemilli/262dbd3c5ff53908b1f008948c4246e8 to your computer and use it in GitHub Desktop.
class Developer extends Person {
constructor (firstName, lastName, role) {
super(firstName, lastName);
this.role = role;
}
hello () {
console.log(`My name is ${this.firstName} ${this.lastName} and I am a ${this.role}`);
}
static haha () {
console.log('haha');
}
}
let hckrmoon = new Developer('Jooyoung', 'Moon', 'Web Developer');
hckrmoon.hello(); // My name is Jooyoung Moon and I am a Web Developer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment