Created
May 29, 2019 23:22
-
-
Save webinista/b680a44504f88d369f3a0e9dfa15a384 to your computer and use it in GitHub Desktop.
isNumeric function for JavaScript
This file contains 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
// Simple way to check whether a particular value is numeric. Saving it here so that I don't have to solve it twice. | |
const isNumeric = (value) => { | |
return !Number.isNaN(parseFloat(value,10)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment