What is the correct use of the || in javascript
<p>In the code below, because  s  is null d = "test"
but if s = "hello" then d would = "hello".</p>

<p>Is this correct as it works? what is the correct way to use ||</p>

<pre><code>var s = null;

var d = s || "test";

alert(d);
</code></pre>
