Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript loop array

let arr = [ 1, 2, 3, 4, "apple", "tomato"]

for(let i=0; i<arr.length; i++){
 printArr = arr[i] 
  console.log(printArr)
  //1 2 3 4 "apple" "tomato"
}
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #javascript #loop #array
ADD COMMENT
Topic
Name
9+9 =