Answers for "itterate items in array in for loop js"

8

iterate through array javascript

const array = ["one", "two", "three"]
array.forEach(function (item, index) {
  console.log(item, index);
});
Posted by: Guest on May-31-2020
2

javascript loop through array

var numbers = [1, 2, 3, 4, 5];
numbers.forEach((Element) => console.log(Element));
Posted by: Guest on October-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language