let arr = [object0, object1, object2]; for (let elm of arr) { console.log(elm); }
yourArray.forEach(function (arrayItem) { var x = arrayItem.prop1 + 2; console.log(x); });
const myArray = [{x:100}, {x:200}, {x:300}]; myArray.forEach((element, index, array) => { console.log(element.x); // 100, 200, 300 console.log(index); // 0, 1, 2 console.log(array); // same myArray object 3 times });
var arr = [[1,2], [3,4], [5,6]]; for (var i=0; i < arr.length; i++) { for (var j=0; j < arr[i].length; j++) { console.log(arr[i][j]); } }