Open xiqe opened 5 years ago
Given a number n, return the number of positive odd numbers below n, EASY!
oddCount(7) //=> 3, i.e [1, 3, 5] oddCount(15) //=> 7, i.e [1, 3, 5, 7, 9, 11, 13]
const oddCount = n => Math.floor(n/2);
Count Odd Numbers below n
Given a number n, return the number of positive odd numbers below n, EASY!
reply