News for hackers. Stuff that matters.
Re:Advanced Javascript tips and tricks by Yansky on Tuesday July 05, 2011 @10:27AM (#2729930)
I don't understand the need for the first example: Array.prototype.push.apply(a, b);

Isn't that what the concat() method is for?

Re:Advanced Javascript tips and tricks by tomstuart on Tuesday July 05, 2011 @10:31AM (#2729946)
Array.prototype.push.apply(a, b) modifies a in-place; a.concat(b) returns a copy of a with b appended to it.