Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript best way to iterate over array

[1,2,3,4,"df"].forEach((value, index) => console.log(index,value));
output
0 1
1 2
2 3
3 4
4 'df'
Source by hackernoon.com #
 
PREVIOUS NEXT
Tagged: #javascript #iterate #array
ADD COMMENT
Topic
Name
7+1 =