Last active
January 15, 2017 06:58
-
-
Save rohit012/39026a1c70ffe9a80e8f11b43e960e72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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