iterate array in javascrpt

JavaScript
var myStringArray = ["Hello","World"];
var arrayLength = myStringArray.length;
for (var i = 0; i < arrayLength; i++) {
    console.log(myStringArray[i]);
    //Do something
}array = [ 1, 2, 3, 4, 5, 6 ]; 
   //set variable//set the stop count // increment each loop
for (let i = 0; i < array.length ;i++) { 
  
         array[i] //iterate through each index.
   //add the intructions you would like to perform.
    
             // add any method to array[
} let array = [ 1, 2, 3, 4 ]; //Your array

for( let element of array ) {
	//Now element takes the value of each of the elements of the array
	//Do your stuff, for example...
  	console.log(element);
}
Source

Also in JavaScript: