I'm having trouble adding these elements of my array together. the dash seems to inhibit the addition of each variable
<p>I'm trying to get the following code to add each number in the element separately and not the whole array together but the dash seems to stop the loop from calculating the total sum of each element. I can't seem to make it so it'll except any length of number for the variable. Any help is greatly appreciated!</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var creditNum = [];
creditNum[0] = ('4916-2600-1804-0530');
creditNum[1] = ('4779-252888-3972');
creditNum[2] = ('4252-278893-7978');
creditNum[3] = ('4556-4242-9283-2260');

var allNum = [];
var total = 0;
var num = 0;
var cnt = 0;
for (var i = 0; i &lt; creditNum.length; i++) {
  num = creditNum[i];

  for (var j = 1; j &lt;= num.length; j++) {
    var num = creditNum[i].substring(cnt, j);
    console.log(creditNum[i].charAt(cnt));
    console.log(cnt, j);

    cnt = cnt + 1;
  }
  if (num != "-") j = j++;
  console.log(parseInt(num));


}
console.log(total);</code></pre>
</div>
</div>
</p>