Project Euler
Problem 16: Power Digit Sum

2 15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26 .

What is the sum of the digits of the number 2 1000 ?


Because Javascript has poor precision with large numbers, I used strings.

I wrote a function to double the value of the numbers in my strings and I ran it 1,000 times. Then I wrote a function to sum the numbers in the string produced by that function.

###,###