Given an array,print the sum and count of the multiples of 3 in the array. Javascript Program
const number=[3,4,5,12]; let sum=0; let count=0; for(let i=0;i<number.length;i++) { if(number[i]%3==0) { sum=sum+number[i]; count++; } } console.log('3Sum='+sum+',3Count='+count); Read More