What is the difference between using the delete operator on the array element as opposed to using the Array.splice method?
For example:
myArray = [\
function deleteFromArray(array, indexToDelete){ var remain = new Array(); for(var i in array){ if(array[i] == indexToDelete){ continue; } remain.push(array[i]); } return remain; } myArray = ['a', 'b', 'c', 'd']; deleteFromArray(myArray , 0);
// result : myArray = ['b', 'c', 'd'];