Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

javascript loop through array

const numbers = [1, 2, 3, 4]
numbers.forEach(number => {
	console.log(number);
}

for (let i = 0; i < number.length; i++) {
	console.log(numbers[i]);
}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #javascript #loop #array
ADD COMMENT
Topic
Name
3+1 =