Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop over an array

let fruits = ['Apple', 'Banana'];

fruits.forEach(function(item, index, array) {
  console.log(item, index);
});
// Apple 0
// Banana 1
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #array
ADD COMMENT
Topic
Name
4+8 =