Adding properties to variables in javascript
<p>Consider the following codes:</p>

<pre><code>var str = "abc";
 str.foo = 123;  // write - ignored
123
 str.foo  // read
undefined
</code></pre>

<p>Why do I get undefined? Shouldn't that property output <code>123</code>? What is the reason for it outputting undefined? </p>

<p>Since <code>var str</code> is a string, why don't properties show up a second time?</p>

<p>Cant we add properties and methods to a string?</p>
