首先定义一个对象
var stooge={first-name: "Jerome", last-name: "Howard", middle-name: "Jerome", nickname: "Curly"}
新建一个继承此对象原型链的所有属性的对象
if(typeof Object.create !== 'function'){
Object.create = function(o){
var F = function(){};
F.prototype = o;
return new F();
}
}
var another_stooge = Object.create(stooge);
执行这个函数
another_stooge['first-name']
"Jerome"
another_stooge.nickname
"Curly"