复制1let count = 0; 2const nums = [0, 1, 2, 3]; 3 4nums.forEach(num => { 5 if (num) count += 1 6}) 7 8console.log(count)
1let count = 0; 2const nums = [0, 1, 2, 3]; 3 4nums.forEach(num => { 5 if (num) count += 1 6}) 7 8console.log(count)
本题为“单选题”
题库维护不易,您的支持就是我们最大的动力!