Find the bugExercise 5/6Elementary20 XP
The digit sum
Task
The function should return the sum of a number's digits. For 47 it should return 11, but it returns 14. Select the faulty line.
You need to know
Your answer
Click the line with the bug.
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.