Loops

From rbachwiki
Jump to navigation Jump to search

Foreach Loop

var i=0;
var letters=["a", "b", "c"];
letters.forEach(function(items){
  console.log(i + " - " +items);
  i++;
  
});

Back To Top- Home - Category