How To Insert An Item Into An Array At A Specific Index In JavaScript
var arr = [];
arr[0] = "Apple";
arr[1] = "Grape";
arr[2] = "Pear";
arr[3] = "Peach";
arr[4] = "Grapefruit";
console.log(arr.join()); // Apple,Grape,Pear,Peach,Grapefruit
arr.splice(2, 0, "Orange");
console.log(arr.join()); // Apple,Grape,Orange,Pear,Peach,Grapefruit