let count = 0;
const nums = [0, 1, 2, 3];
nums.forEach(num => {
if (num) count += 1;
});
console.log(count);
WebDEV #test #Frontend
Выберите правильный вариант 👇🏼
WE WebDEV @webb_dev · 8.3K subscribers let count = 0;
const nums = [0, 1, 2, 3];
nums.forEach(num => {
if (num) count += 1;
});
console.log(count);