Javascript Array insert(index)

Description

Javascript Array insert(index)


Array.prototype.insert = function(index) {
    this.splice.apply(this, [index, 0].concat(
        Array.prototype.slice.call(arguments, 1)));
    return this;//from w  ww. j  ava2 s  . c o  m
};



PreviousNext

Related