Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

for of javascript

let arr = ["a", "b", "c"]

for (let i in arr){
  console.log(i) // 0, 1, 2
}

for(let i of arr){
  console.log(i) // a, b, c
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
1+3 =