How can I add a number to a variable to which I assigned a number in Javascript?
<p>I have the following:</p>

<pre><code>var offset;
offset = localStorage.getItem('test.MenuList.Offset.' + examID + "." + level) || 0;
offset += 100;
</code></pre>

<p>When I use the debugger this offset now has 0100. I want it to add like a number not a string. How can I do this?</p>

<p><strong>Please note</strong> I changed the question slightly because I realized I was getting the value from local storage. I assume this returns a string. But I am still not sure how to solve this.</p>
