Deleting array elements in JavaScript – delete vs splice

What is the difference between using the delete operator on the array element as opposed to using the Array.splice method? For example: myArray = [‘a’, ‘b’, ‘c’, ‘d’]; delete myArray[1]; // or myArray.splice (1, 1); Why even have the splice method if I can delete array elements like I can with objects? 2 27 delete … Read more