isNumeric
isNumeric(x)
Try it yourself:
$1 |
isNumeric(2)
|
|
$2 |
isNumeric("2")
|
|
$3 |
hasNumericValue("2")
|
|
$4 |
isNumeric(0)
|
|
$5 |
isNumeric(bignumber(500))
|
|
$6 |
isNumeric(fraction(0.125))
|
|
$7 |
isNumeric(2 + 3i)
|
|
$8 |
isNumeric([2.3, "foo", false])
|