Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to loop over an array in js

var data = [1, 2, 3, 4, 5, 6];

// Using for each loop
data.forEach( (x) => {
  console.log(x)
}
Source by code.tutsplus.com #
 
PREVIOUS NEXT
Tagged: #loop #array #js
ADD COMMENT
Topic
Name
7+5 =