Javascript Array each(command)
"use strict";//from w w w . j a va 2 s .c om Array.prototype.each = function(command){ for(var i = 0; i < this.length; i++){ command(this[i]); } return this; };