Sum until one digit
Challenges
• Last reply from orlandu8@gmail.com at July 15, 2021 at 2:22AM UTC
Here's what I got for the solution
function sumDigits {
let n = num % 9;
if {
return 9;
} else {
return n;
}
}
The challenge says expected time complexity to be O, but unless I'm missing something here. This is O isn't it?