loop variable javascript get value code example
Example 1: javascript loop through array
var colors = ["red","blue","green"];
colors.forEach(function(color) {
console.log(color);
});
Example 2: for loop
fruits = ['apple', 'orange', 'peach']
for fruit in fruits:
print(fruit)