push an element at 0 index in array javascript code example Example: insert item into array specific index javascript myArray.splice(index, 0, item);