Last active
January 30, 2018 21:08
-
-
Save michaelwhyte/b219c51c77a20d836722350a02483612 to your computer and use it in GitHub Desktop.
A function to determine if a value is a number even if the value is a string number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Code from this stackoverflow question | |
| // https://stackoverflow.com/questions/175739/is-there-a-built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number | |
| function isNumeric(num){ | |
| return !isNaN(num) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment