Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript array looping example

var array = ['a', 'b', 'c']
array.forEach((value, index) => {
  console.log(index); // Will log each index
  console.log(value); // Will log each value
});
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #javascript #array #looping
ADD COMMENT
Topic
Name
5+1 =