Skip to main content

JavaScript Question 145

Question 145 of 0JavaScript

What's the output?

Login Required

Please login to select answers and solve this question. You can view the question without logging in.

Code:
let count = 0;
const nums = [0, 1, 2, 3];
nums.forEach(num => {
	if (num) count += 1
})

console.log(count)

Select the correct option: