Javascript Shorthanding
<p>Consider the following example:</p>

<pre><code>if (cache) {
    x = cache;
} else {
    x = cache = someMethod();
}
</code></pre>

<p>Anyway to make this shorter than <code>cache ? x = cache : x = cache = someMethod();</code>?</p>

<p><strong>EDIT:</strong></p>

<p>Thanks for all the proposed solutions, I should have noted that the data in question is strings not booleans.</p>
