You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function new() {
var obj = new Object(),
var Constructor = [].shift.call(arguments);
obj.__proto__ = Constructor.prototype;
var ret = Constructor.apply(obj, arguments);
return typeof ret === 'object' ? ret : obj;
};
function new() {
var obj = new Object();
Constructor = [].shift.call(arguments);
// 寄生继承
var F = function () {};
F.prototype = Constructor.prototype;
obj = new F();
var ret = Constructor.apply(obj, arguments);
return typeof ret === 'object' ? ret : obj;
};
mqyqingfeng/Blog#13
发生看如下四步操作:
The text was updated successfully, but these errors were encountered: