Object.Create( ) is a static function which can take two arguments. The first argument is the prototype of the object, while the second argument is the properties of the argument. A prototype is a second object that is created with every JavaScript object. It is like a blueprint, or the model that the object is built on. Think of it as a car prototype.
So let's create an object with Object.Create( ) function:
var person = Object.create({
name: "Tech Junkie",
location: "Mars",
hobbie: "Video Games"
});
console.log(person);
So let's create an object with Object.Create( ) function:
var person = Object.create({
name: "Tech Junkie",
location: "Mars",
hobbie: "Video Games"
});
console.log(person);