You have learned that we can iterate an array using the for loop and the forEach method. ES2015 introduced the for..of loop, which iterates through the values of an array. We can take a look at an example of how to use the for..of loop:
for (const n of numbers) { console.log(n % 2 === 0 ? 'even' : 'odd'); }