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.hackerhero.com #
 
PREVIOUS NEXT
Tagged: #javascript #array #looping
ADD COMMENT
Topic
Name
2+6 =