Javascript Array split(i)
Array.prototype.split = function(i) { return [this.slice(0, i), this.slice(i)]; }; var bspArray = [10, 20, 23, 56, 68]; console.log(bspArray.split(3));// w w w.j a v a 2 s . com