condition javascript statement throws exception vs inline condition
<p>The following conditional statement throws an exception when the value is not defined:  </p>

<pre><code>if (!(e = e[f])) {
    e[f] = {};
}  
</code></pre>

<p>while the following inline condition doesn't throw any exception:</p>

<pre><code>e = e[f] ? e[f] : e[f] = {};
</code></pre>

<p>Here is the function that contains the condition, it's responsible for creating objects dynamically starting from the window object:</p>

<pre><code>function t(a, c) {
    var s = a.split('.'),
        e = window;
    // works only in IE
    !(s[0] in e) &amp;&amp; e.execScript &amp;&amp; e.execScript('var '+ s[0]);
    for (var f; s.length &amp;&amp; (f = s.shift()); ) {
        if (!s.length &amp;&amp; void 0 !== c) {
            e[f] = c;
        }else {
            e = e[f] ? e[f] : e[f] = {};
        }
    }
}
</code></pre>

<p>An example for calling this function:   </p>

<pre><code>t('s.d');
</code></pre>

<p>This call should create a new Object: <code>window.s.d</code></p>

<p>Does anyone have any idea about what's going on?</p>
