Skip to content

Instantly share code, notes, and snippets.

@rohit012 rohit012/es6-Class.js
Last active Jan 15, 2017

Embed
What would you like to do?
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
You can’t perform that action at this time.