Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
5+9 =