Created
July 31, 2020 10:28
-
-
Save dnshko/35d425d0ce1f396a325478100101084d to your computer and use it in GitHub Desktop.
entity
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 Developer { | |
constructor(firstname, lastname) { | |
this.firstname = firstname; | |
this.lastname = lastname; | |
} | |
getName() { | |
return this.firstname + ' ' + this.lastname; | |
} | |
} | |
class ReactDeveloper extends Developer { | |
getJob() { | |
return 'React Developer'; | |
} | |
} | |
var me = new ReactDeveloper('DINESH', 'KO'); | |
console.log(me.getName()); | |
console.log(me.getJob()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment