What value is printed when executing the following code?
let count = 0;
const numbers = [1, 2, 3, 4, 5];
numbers.forEach(num => {
if (num % 2 === 0) count++;
});
console.log(count);
What value is printed when executing the following code?
let count = 0;
const numbers = [1, 2, 3, 4, 5];
numbers.forEach(num => {
if (num % 2 === 0) count++;
});
console.log(count);