code: function arraySplice(a1, from, to, a2) {
      var aL = a1.slice(0, from);
      var aR = a1.slice(to);
  
      return aL.concat(a2).concat(aR);
  }
docs: Splice array replacing it's elements by another array.
  
  @param {Array} a1 Array to splice.
  @param {Number} from Splice start index.
  @param {Number} to Splice finish index.
  @param {Array} a2 Array to inject.
  @returns {Array} New array.