Optimize custom Object Property in Array with Javascript
<p>Look at the 3 lines of code within this Javascript function. Assume that <code>y</code> will always be a <em>String</em>:</p>

<pre><code>function example(x, y) {
    var s = {};
    s[y]  = x;
    return s;
}
</code></pre>

<p>Bearing in mind the following:</p>

<ol>
<li>Without wrapping it further within a function</li>
<li>Without using <code>;</code></li>
</ol>

<p>Is it possible to condense the 3 lines of code into one?</p>
