Javascript shortest possible check for undefined, if it is assign a default value
<p>If passing params or an object full of properties into function, it's useful to check for undefined params and give default values to those that are undefined.</p>

<p>Without using a library function like jQuery extent, what would be the shortest about of code to do this kind of assigning defaults?</p>

<p>Here is the shortest I can think of:</p>

<pre><code>var test;
var output = (typeof test != "undefined") ? test : "Default";
</code></pre>

<p>Before someone suggests:</p>

<pre><code>var test;
var output = test || "Default";
</code></pre>

<p>That will not work with false, 0 or ""</p>
