Created
January 19, 2019 12:16
-
-
Save abdihaikal/28ede69200c6b14fd09f31de56240710 to your computer and use it in GitHub Desktop.
Method checks whether its argument represents a numeric value.
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
function isNumeric(value) { | |
return !isNaN(parseFloat(value)) && isFinite(value) && 'number' === typeof value && value === Number(parseFloat(value)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment