javascript string assignment by index number quirk
<pre><code>a="12345"
a[2]=3
a[2]='9'
console.log(a) //=&gt; "12345"
</code></pre>

<p>What is going on?? This quirk caused me 1 hour painful debugging. How to avoid this in a sensible way?</p>
