loop through javascript array

JavaScript
var colors = ["red","blue","green"];
for (var i = 0; i < colors.length; i++) {
    console.log(colors[i]);
}const array = ["hello", "world"];

for (item of array) {
	//DO THIS
}var colors = ["red","blue","green"];
colors.forEach(function(color) {
  console.log(color);
});var myStringArray = ["Hello","World"];
var arrayLength = myStringArray.length;
for (var i = 0; i < arrayLength; i++) {
    console.log(myStringArray[i]);
    //Do something
}let colors = ['red', 'green', 'blue'];
for (const color of colors){
    console.log(color);
}
Source

Also in JavaScript: