Javascript shorthand if + shorthand assignment
<p>I'm wondering if there's a way to merge shorthand if/else with shorthand +=</p>

<p>Something like this:</p>

<pre><code>var value;
$.each(data.events, function(index, element) {
    var otherValue = element.value;
    value = value ? value + otherValue : '';
}
</code></pre>

<p>Something to prevent</p>

<pre><code>value += otherValue
</code></pre>

<p>From adding 'undefined' to the beginning when value is undefined.</p>

<p>The long version would be:</p>

<pre><code>var value;
$.each(data.events, function(index, element) {
    var otherValue = element.value;
    if(value){
        value = value + otherValue;
    }

}
</code></pre>

<p>I hope the question is not (too) confusing :)</p>