function_new(){letnewObj={};letConstructor=Array.prototype.shift.call(arguments);//这里为什么不能直接letConstructor=arguments[0]呢?newObj.__proto__=Constructor.prototype;Constructor.apply(newObj,arguments);returnnewObj;}
letnewObj={};letConstructor=Array.prototype.shift.call(arguments);//这里为什么不能直接letConstructor=arguments[0]呢?newObj.__proto__=Constructor.prototype;Constructor.apply(newObj,arguments);returnnewObj;}
letConstructor=Array.prototype.shift.call(arguments);//这里为什么不能直接letConstructor=arguments[0]呢?newObj.__proto__=Constructor.prototype;Constructor.apply(newObj,arguments);returnnewObj;}
//这里为什么不能直接letConstructor=arguments[0]呢?newObj.__proto__=Constructor.prototype;Constructor.apply(newObj,arguments);returnnewObj;}
newObj.__proto__=Constructor.prototype;Constructor.apply(newObj,arguments);returnnewObj;}
Constructor.apply(newObj,arguments);returnnewObj;}
returnnewObj;}
}
慕婉清6462132
猛跑小猪
相关分类