logo
logo

Sum of Odd Numbers

Sum of Odd Numbers

Write a function called
sumOddNumbers
that takes an array of numbers and returns the sum of all the odd numbers in the array. The function should use a while loop to iterate over the array and sum up the odd numbers.
Console
Submit
Solution
00:00