Here you can find the source of each(action)
// Perform the given action on each element of the array. Array.prototype.each = function (action) { this.map(function(el){action(el);}); return this;/*w w w . j a v a 2s. c om*/ };
Array.prototype.each = Array.prototype.forEach; Object.prototype.eachKey = function (cb) { var k = Object.keys(this); for (var i = 0; i < k.length; i++) cb(k[i], this[k[i]]); }; var times = function (n, cb) { for (var i = 0; i < n; i++) cb(n); }; ...
Array.prototype.each = function () { this.forEach.apply( this, arguments ); return this; };
Array.prototype.each = function(action) { var args = getArgs(1,arguments); var arr = this; for (var i = 0, l = arr.length; i < l; ++i) { action.apply(this,[arr[i],i].concat(args)); };
Array.prototype.each = function(action){ for(var i = 0; i< this.length; i++){ action(this[i], i); };
Array.prototype.each = function(action) { for (var i = 0, l = this.length; i < l; ++i) { action(this[i], i); };
Array.prototype.each = function(block){ for(var i=0;i<this.length;i++) block(this[i])
Array.prototype.each = function(callback){ for(var i = 0; i < this.length; i++){ callback(this[i]);
Array.prototype.each = function(callback) { for (var i = 0;i < this.length;i++) { callback(this[i], i); };
Array.prototype.each = function(callback){ if(!callback) return; for(var i = 0; i < this.length; i++){ callback(this[i]);