how is it calculated?
<p>I want to know why the answer of this script is </p>

<pre><code>var h1Array = $('h1').first().text().split(' '),
                        h1Last = h1Array[h1Array.length-1],
                        answerElem = $('#jschl_answer');

                    answerElem.val(22+14*10);
                    answerElem.val(parseInt(answerElem.val())+(h1Last.substr(0,h1Last.length-1)).length);
</code></pre>

<p>what is the sum of this? i know that 10*14 = 140 + 22 = 162 but why in this case the sum is 179</p>

<p>so from where we got the extra 17?</p>

<p>Another example</p>

<pre><code>var h1Array = $('h1').first().text().split(' '),
                        h1Last = h1Array[h1Array.length-1],
                        answerElem = $('#jschl_answer');

                    answerElem.val(46+36*8);
                    answerElem.val(parseInt(answerElem.val())+(h1Last.substr(0,h1Last.length-1)).length);
</code></pre>

<p>sum = 347 while the sum of answerElem.val(46+36*8); is actually equals to 334 so from where we got the extra 13?</p>

<p>Thank you in advance.</p>
