Answers for "javascript for loop not going through array"

1

javascript function loop through array

//function arrayLooper will loop through the planets array
const planets = ["Mercury", "Venus", "Earth", "Mars"];

const arrayLooper = (array) => {
  for (let i = 0; i < array.length; i++) {
    console.log(array[i]);
  }
};
arrayLooper(planets);
Posted by: Guest on September-05-2021

Code answers related to "javascript for loop not going through array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language