// Mozilla's Array Generics ['concat', 'every', 'filter', 'forEach', 'indexOf', 'join', 'lastIndexOf', 'map', 'some', 'slice'].forEach(function(func) { if (!Array[func]) Array[func] = function (object) { return this.prototype[func].apply(object, Array.prototype.slice.call(arguments, 1)); } });