Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to loop through array of numbers in javascript

let numbers = [1,2,3,4,5];
let numbersLength = numbers.length;
for ( let i = 0; i < numbersLength; i++) {
    console.log (numbers[i]);
}
 
PREVIOUS NEXT
Tagged: #loop #array #numbers #javascript
ADD COMMENT
Topic
Name
2+7 =