iterate through list javascript

JavaScript
const array = ["one", "two", "three"]
array.forEach(function (item, index) {
  console.log(item, index);
});var colors = ["red","blue","green"];
for (var i = 0; i < colors.length; i++) {
    console.log(colors[i]);
}/* ES6 */
const cities = ["Chicago", "New York", "Los Angeles"];
cities.map(city => {
	console.log(city)
})
String[] myStringArray = {"Hello", "World"};
for (String s : myStringArray)
{
    // Do something
}let numbers = [1,2,3,4,5];
let numbersLength = numbers.length;
for ( let i = 0; i < numbersLength; i++) {
    console.log (numbers[i]);
}const array = ["hello", "world"];

for (item of array) {
	//DO THIS
}
Source

Also in JavaScript: