add object in array 0 index javascript code example
Example: add an object to index 0 array js
//Add an object to start of array
splice(index,noOfItemstoDelete,item);
ex - arr.splice(0,0,item);
//Add an object to start of array
splice(index,noOfItemstoDelete,item);
ex - arr.splice(0,0,item);