Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object.create() js

const parent = {
  name: "Stacey",
  surname: "Moore",
  age: 54,
  heritage: "Irish",
};
// Change code below this line

const child = {
__proto__: parent

};

// Change code above this line
child.name = "Jason";
child.age = 27;
 
PREVIOUS NEXT
Tagged: #js
ADD COMMENT
Topic
Name
2+8 =