new Number() / Is there a better way to cast?
<p>This is for the code below which I got from <a href="http://www.javascriptkit.com/javatutors/navigator.shtml" rel="nofollow">here</a>.  I'm trying to make it a bit more robust by running it through <a href="http://www.jshint.com" rel="nofollow">jshint</a> which reports that you should not use new Number().</p>

<pre><code>else if ( /Firefox[\/\s](\d+\.\d+)/.test( navigator.userAgent ) ) {
    name = 'Firefox ';
    version = new Number( RegExp.$1 );
    if( version &lt; 10 ) {
        f_value = [ name, version ];
        document.body.innerHTML = 'You are Running - ' + f_value[0] + ' ' + f_value[1] + message;
        return false;
    }
}
</code></pre>
