Javascript Array each(action)

Description

Javascript Array each(action)

Array.prototype.each = function(action){
    for(var i = 0; i< this.length; i++){
        action(this[i], i);//from   w w w.j  av a2  s  .c  om
    }
};



PreviousNext

Related