function Parent() {
this.color = ['pink', 'red'];
}function createAnother(o) {
// 获得当前对象的一个克隆
var another = new Object(o);
// 增强对象
o.sayHi = function() {
console.log('Hi');
}
// 返回对象
return another;
}MMMHUHU
相关分类