Object.create = function(o){ var Fun = function(){}; Fun.prototype = o; return new Fun(); } var peo = { name:'liu', age : 24, } var stu = Object.create(peo); stu.sex = 'man'; console.log(stu)
Object.create = function(o){ var Fun = function(){}; Fun.prototype = o; return new Fun(); } var peo = { name:'liu', age : 24, } var stu = Object.create(peo); stu.sex = 'man'; console.log(stu)