loop through array in Js and get the value code example
Example 1: 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]);
}
Example 2: how to use for loops to work with array in javascript
let myArray = ["one", "two", "three", "four"];