Do I need to use an "=" when using the ? : javascript shortcut?
<p>Can someone tell me if this is valid javascript to do this:</p>

<pre><code>        if (wf.statusId == Status.Dirty) {
            wf.createdDate
                ? promises.push(self.wordFormUpdateSubmit(wf, key))
                : promises.push(self.wordFormAddSubmit(wf, key));
        } 
</code></pre>

<p>Would there be cases where this would not work correctly if createdDate was not defined? </p>

<p>Here's what this replaced:</p>

<pre><code>        if (wf.statusId == Status.Dirty) {
            if (wf.createdDate) {
                var updatePromise = self.wordFormUpdateSubmit(wf, key);
                promises.push(updatePromise);
            } else {
                var addPromise = self.wordFormAddSubmit(wf, key);
                promises.push(addPromise);
            }
        }
</code></pre>

<p>Also a related question.  Would it be possible to use the same syntax with ? : to replace the need for the if () { } construct ?</p>