Array.prototype.each = function(fn) { for(var el in this) { if(Array.prototype.each != this[el]) fn.call(this[el]); } }