Why does my hash table contain a spurious value?
<p>I'm creating a hash table to check whether a four-letter word is valid:</p>

<pre><code>function myClickHandler(myClickHandler)
{
    var words4=new Array("abed", "abet", "able", "ably", "abut", "aces", "ache", "achy");

    // Initialise hash table
    var wordhash = new Array();

    for (var i in words4)
        {
            wordhash[ words4[i] ] = true;
        };

    var text = wordhash['10'];
}
</code></pre>

<p>However, when I examine the hash table in a debugger the first element seems to be:</p>

<pre><code>wordhash['10'] = true
</code></pre>

<p>so the final statement in my test function sets the variable text to true. Why is this happening?</p>

<p>Thanks</p>
