Convert True->1 and False->0 in Javascript?
<p>Besides : </p>

<p><code>true  ? 1 : 0</code></p>

<p>is there any short trick which can "translate" <code>True-&gt;1</code> and <code>False-&gt;0</code> in Javascript ?</p>

<p>I've searched but couldn't find any alternative</p>

<p><em><strong>What</strong> do you mean by "short trick" ?</em></p>

<p>answer : same as <code>~~6.6</code> is a trick for<code>Math.floor</code></p>
