Answers for "javascript parameter loop 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
0

javascript loop through arra

int[] objects = {
	"1", "2", "3", "4", "5"
};

for (int i = 0; i < objects.length; i++) {
	System.out.println(objects[i]);
}
Posted by: Guest on May-18-2021

Code answers related to "javascript parameter loop through array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language