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 forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #loop #array #js
ADD COMMENT
Topic
Name
7+6 =