Simpler alternative to double if statement javascript
<p>I'm looking for a simpler way to write this tiny bit of code:</p>

<pre><code>if (a &gt; max)
    a = max;
if (a &lt; min)
    a = min;
</code></pre>

<p>What's the easiest way to do this in javascript?</p>
