1 messages · Page 1 of 1 (latest)
because you're not returning anything outside of the for loop
what if nums is empty? the loop won't execute and the function is going to return undefined
nums