April 2018
Beginner to intermediate
426 pages
10h 19m
English
If we need the array to be completely iterated no matter what, we can use the forEach function. It has the same result as using a for loop with the function's code inside it, as follows:
numbers.forEach(x => console.log(x % 2 === 0));