How does this shorthand statement actually work? "x = ( typeof x != 'undefined' && x instanceof Array ) ? x : [];"
<pre><code>x = ( typeof x != 'undefined' &amp;&amp; x instanceof Array ) ? x : [];
</code></pre>

<p>I understand that if x is defined and it is an array it will do everything between ? and : then if undefined or it is not an array it will do []. what is []?</p>

<p>Does anyone know where i can get examples of how this works and other shorthand techniques or can you explain what is happening here?</p>

<p>I just really dont understand how it is creating an array</p>
