JSFiddle - React, Tailwind, and code Playground
JavaScript
if (typeof Object.create !== 'function')
{
Object.create=function(o)
{
function F(){}
F.prototype=o;
return new F();
}
}
var person = {
'first-name': 'FirstName',
'last-name': 'LastName',
'gender': 'Male'
};
var anotherPerson=Object.create(person);
anotherPerson.age=25;
anotherPerson.gender="Female";
console.log(person.gender); // Male
console.log(anotherPerson.gender); // Female
console.log(person.age); // undefined
console.log(anotherPerson.age); // 25