referencing variable in javascript
<pre><code>var items = new Array("one", "two", "three");
var itemsRef = items;
items.push("four");
console.debug(itemRef);
console.debug(items);
</code></pre>

<p>I really dont get the idea how above <code>items</code> and <code>itemsRef</code> are same even items added "four" when after <code>itemsRef</code> referenced <code>items</code>. Isn't it reasonable that <code>itemsRef</code> should have only ("one" "two" "three")?</p>

<p>If <code>itemsRef</code> keep pointing <code>items</code> forever, why do we use such an useless argument like <code>items = itemsRef</code>? I am still not getting the idea. Can anybody tell me how this is works and why JavaScript let variables pointing each other forever?   </p>
