title: JavaScript Number Split into individual digits
body: <p>I am trying to solve a math problem where I take a number e.g. <code>45</code>, or <code>111</code> and then split the number into separate digits e.g. <code>4 5</code> or <code>1 1 1</code>. I will then save each number to a var to run a method on. Does anyone know how to split a number into individual digitals?</p>
  <p>For example I have a loop that runs on an array :</p>
  <pre><code>for (var i = 0; i &lt; range.length; i++) {
    var n = range[i];
  }
  </code></pre>
  <p>For each number, I would like to split its digits and add them together?</p>