arr.splice(index, 0, item); // will insert item into arr at the specified index // (deleting 0 items first, that is, it's just an insert).