Skip to content

Instantly share code, notes, and snippets.

@rohit012
Last active January 15, 2017 06:58
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 rohit012/39026a1c70ffe9a80e8f11b43e960e72 to your computer and use it in GitHub Desktop.
Save rohit012/39026a1c70ffe9a80e8f11b43e960e72 to your computer and use it in GitHub Desktop.
class Person {
constructor(name = '', age = 0) {
this.name = name;
this.age = age;
}
getName() {
return this.name;
}
}
class Employee extends person {
constructor(name, age, type) {
super(name, age);
this.type = type;
}
}
let employee = new Employee('Bob', 32, 'developer');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment