title: Javascript: How can I loop through a multi-digit number and find the consecutive digit ^ n of each?
body: <p>For instance, let's say I have the number 345. How can I in javascript loop through each digit in the number and raise it to the consecutive nth power: i.e. 3^1 + 4^2 + 5^3?</p>