i want to push à value in array , but not at the end, not at the start, at the first empty index
Show the code exemple:
var test=new Array();
test[0]="Lionel";
test[2]="Jhon";
test.push("Cloé");
result:
[ 'Lionel', <1 empty item>, 'Jhon', 'Cloé' ]
And i need to have Cloé just after Lionel Thanks
Edit this is different to insert in specific index, because i can't know the number of empty index, this is slot system . And i just wanna know if we have native solution ?.