Why don't switch statements work with arrays?
<p>The following alerts nothing. I assume everyone can see what I'm trying to accomplish. Does anyone know what's going wrong?</p>

<pre><code>var myarray = ['foo', 'bar'];

switch (myarray) {

    case ['foo', 'bar']:
        alert('foobar');
        break;

    case ['foo', 'foo']:
        alert('foofoo');
        break;
}
</code></pre>
