Answers for "how to loop through an array and put each element in a new array"

1

create a loop that runs through each item in an array

Create a loop that runs through each item in the "fruits" array.

var fruits = ['Apple', 'Banana', 'Orange']

for(x of fruits){
	console.log(x);
}
Posted by: Guest on June-10-2021

Code answers related to "how to loop through an array and put each element in a new array"

Browse Popular Code Answers by Language