Sum all the digits of a number Javascript : <p>I am newbie.</p>

<p>I want to make small app which will calculate the sum of all the digits of a number.</p>

<p>For example, if I have the number 2568, the app will calculate 2+5+6+8 which is equal with 21. Finally, it will calculate the sum of 21's digits and the final result will be 3 .</p>

<p>Please help me</p>
