How to find length of literal array?
<p>So, why does this result in 0 and how do I find the actual size?</p>

<pre><code>var array = [];
array["foo"] = "bar";
array["bar"] = "foo";

document.write(array.length);
</code></pre>
