JSFiddle - React, Tailwind, and code Playground
HTML
<table>
<tr>
<th></th>
<th>!isNaN()</th>
<th>$.isNumeric()</th>
</tr>
</table>
CSS
table {
border-collapse:collapse;
}
th, td {
border:1px solid black;
padding:2px 3px;
}
JavaScript
var values = [
"-10",
16,
0xFF,
"0xFF",
"8e5",
3.1415,
+10,
0144,
"",
{},
NaN,
null,
true,
Infinity,
undefined
];
for( var index in values ) {
var v = values[ index ];
$( 'table' ).append( '<tr><td>'+v+'</td><td>'
+(!isNaN( v )?"true":"false")
+'</td><td>'
+($.isNumeric( v )?"true":"false")
+'</td></tr>' );
}