Considering that we have the following array below: Each method has different features, and it is up to you, depending on what you're doing, to decide which one to use. First way: ForEach method. That is, they have length and indexes properties, but they may also have other non-numeric … The JavaScript Loop is used to iterate through an array of items (which can be a number array, string array, etc) or objects. The continue statement can be used to restart a while, do-while, for, or label statement.. If you define arr as: var arr = ["hello"]; arr[100] = "goodbye"; Then the array … The issue is that a JavaScript array can have "holes". The following article provides an outline for JavaScript Loop Array. In this post, we are going to take a closer look at the JavaScript forEach method. JavaScript arrays are zero indexed: the first element of the array starts at zeroth index. In es6 we have a forEach method which helps us to iterate over the array of objects. An alternative way of iterating through an array is using a for-loop: for (var ix=0;ix