Created
August 19, 2019 01:32
-
-
Save Mayankgupta688/d4774188752ba32d82b04797935a73db 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
var userInfo = { | |
name: "Mayank", | |
age: 30, | |
salary: 10000, | |
designation: "Developer" | |
getData: function() { | |
alert(this.name); | |
} | |
} | |
var newObject = Object.create(userInfo); | |
newObject.getData(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment