Check that variable is a number
<p>How can I check that a variable is a number, either an integer or a string digit?</p>

<p>In PHP I could do:</p>

<pre><code>if (is_int($var)) {
    echo '$var is integer';
}
</code></pre>

<p>Or:</p>

<pre><code>if (is_numeric($var)) {
    echo '$var is numeric';
}
</code></pre>

<p>How can I do it in jQuery/JavaScript?</p>
