Created
November 3, 2018 07:16
-
-
Save irridescentrambler/550e4097715752ca4347afaec9480102 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function Person(name, city){ | |
this.name = name; | |
this.city = city; | |
} | |
Person.prototype.greet = function(){ | |
console.log("Hello my name is " + this.name); | |
} | |
function Developer(name, city, language){ | |
Person.call(name, city); | |
this.language = language; | |
} | |
var nikhil = new Developer("Nikhil", "Pune", "Javascript"); | |
console.log(nikhil); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment