Difference between associative [],{} and object in javascript
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/874205/what-is-the-difference-between-an-array-and-an-object">What is the difference between an array and an object?</a><br>
  <a href="http://stackoverflow.com/questions/12912598/the-item-exists-in-the-array-but-it-says-that-the-array-is-0-length">The item exists in the array but it says that the array is 0 length?</a>  </p>
</blockquote>



<p>I m a bit confused in object and associative array in javascript. I read this  :<a href="http://stackoverflow.com/questions/8146104/whats-the-difference-between-objects-and-associated-array-in-javascript">question</a> but this question says that there is not much of a difference in both. I wrote this in the console:</p>

<pre><code>var a = [];
a["A"] = 1;

var b = {};
b["B"] = 2;

var c = new Object();
c["C"] = 3;
</code></pre>

<p>output for above are as:</p>

<pre><code>a gives {A : 1} 
b gives {B : 2}
c gives {C : 3}
</code></pre>

<p>All above three cases gives same reault as in they all gives an object. Question is how all above 3 cases are treated in javascript.</p>
