What value is printed when executing the following code?
let count = 0;
const arr = [false, true, false, true];
arr.forEach(value => {
if (value) count++;
});
console.log(count);
What value is printed when executing the following code?
let count = 0;
const arr = [false, true, false, true];
arr.forEach(value => {
if (value) count++;
});
console.log(count);