Running the unit tests against the new code and it only fails on the infinity and boolean literals, and the only time that should be a problem is if you're generating code (really, who would type in a literal and check if it's numeric? It's definitely not the shortest possible regular expression, but I believe it catches all the finer subtleties of Java Script's number syntax.
You should The accepted answer failed your test #7 and I guess it's because you changed your mind. function is Number(n) function is Finite Number(n) function is Comparable Number(n) is Finite Number('Na N') false is Finite Number('Ox FF') true is Number('Na N') true is Number(1/0-1/0) true is Comparable Number('Na N') false is Comparable Number('Infinity') true Explained: Create a copy of itself, then converts the number into float, then compares itself with the original number, if it is still a number, (whether integer or float) , and matches the original number, that means, it is indeed a number. I realize this has been answered many times, but the following is a decent candidate which can be useful in some scenarios.