Contact: aviboots(AT)netvision.net.il
39,943 questions
51,881 answers
573 users
const arr = [4, 1, 2, 8, 9, 5, 5, 1, 7, 8, 8]; let count = 0; arr.forEach(element => { if (element === 8) { count += 1; } }); console.log(count); /* run: 3 */