Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Mayankgupta688/2eb401b5098b466c14d6d56762172ebf to your computer and use it in GitHub Desktop.
var userInfo = {
name: "Mayank",
age: 30,
salary: 10000,
designation: "Developer"
}
var newObject = Object.create(userInfo);
newObject.name = "Other Name";
console.log(newObject)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment