what is a for javascript code example
Example 1: javascript loop through array
var colors = ["red","blue","green"];
colors.forEach(function(color) {
console.log(color);
});
Example 2: for loop
for(int i = 0; i < some_number; i++){
//inside loop do whatever you want
}