Function prototype: Difference between revisions

Content added Content deleted
Line 318: Line 318:


List.prototype.push = function() {
List.prototype.push = function() {
[].push.apply(this, arguments);
return [].push.apply(this, arguments);
return this.length;
};
};


Line 341: Line 340:


List.prototype.push = function() {
List.prototype.push = function() {
[].push.apply(this, arguments);
return [].push.apply(this, arguments);
return this.length;
};
};