Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

loop through array in javascript

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

// traditional for loop
for(let i=0; i<=data.length; i++) {
  console.log(data[i])  // 1 2 3 4 5 6
}
Source by hackernoon.com #
 
PREVIOUS NEXT
Tagged: #loop #array #javascript
ADD COMMENT
Topic
Name
8+8 =