title: Printing out extra 0's while writing numbers in Expanded Form via javascript
body: <p>Can't seem to figure out why I keep printing out extra 0's.</p>
  
  <p>As of now, if the value was 730, this is what shows up:</p>
  
  <pre><code>Expected: '700 + 30', instead got: '700 + 30 + 0'
  </code></pre>
  
  <p><strong>Criteria:</strong></p>
  
  <p>"You will be given a number and you will need to return it as a string in  Expanded Form. For example:</p>
  
  <p>12 Should return 10 + 2</p>
  
  <p>42 Should return 40 + 2</p>
  
  <p>70304 Should return 70000 + 300 + 4</p>
  
  <p>NOTE: All numbers will be whole numbers greater than 0."</p>
  
  <hr>
  
  <pre><code>function expandedForm(num) {
    var i,
        position,
        numArr = Array.from(num.toString()).map(Number),
        numArrLen = numArr.length,
        result = '';
    if(num &lt; 10){
      return num;
    } else {
      for(i = 0; i &lt; numArrLen; i++){
        position = numArrLen-1-i;
  
        if( i === numArrLen-1 ){
          result += numArr[i] * Math.pow(10, position);
          console.log('done',result);
        } else {
          if(numArr[i] !== 0){
            result += numArr[i] * Math.pow(10, position) + " + ";
            console.log('keep going',result);
          } else {
            continue;
            console.log('zero', result);
          }
        }
      }
      return result;
    }
  }
  </code></pre>