loop 1 item in array code example
Example 1: javascript loop through array of objects
yourArray.forEach(function (arrayItem) {
var x = arrayItem.prop1 + 2;
console.log(x);
});
Example 2: javascript loop through array of objects
//Only to be used if you need the numbers
var array = new Array(item1,item2,item3)
for(i=0;i<array.length;i++){
if(i==2){
console.log(array[i])
}
}