Javascript Array move(fromIndex, toIndex)

Description

Javascript Array move(fromIndex, toIndex)


Array.prototype.move = function(fromIndex, toIndex) {
    this.splice(toIndex, 0, this.splice(fromIndex, 1)[0]);
};



PreviousNext

Related