Contact: aviboots(AT)netvision.net.il
43,909 questions
57,306 answers
573 users
const arr = [true, 'javascript', true, 'node.js', true, 'c++', true, false, true]; const count = arr.filter(value => value === true).length; console.log(count); /* run: 5 */