The splice() method is used to remove an element; however, the array is being re-indexed when you run splice(), which means that you will skip over an index when one is removed. In this tutorial, we are going to learn different ways to loop through an array of objects in JavaScript. Preview. Considering that we have the following array below: An alternative way of iterating through an array is using a for-loop: for (var ix=0;ix