Last active
May 28, 2024 18:30
-
-
Save BroFox86/ab4ead60ec513bc2045284193bb2c42f to your computer and use it in GitHub Desktop.
[isNumber] Check if value is number #jsTrick
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
function isNumber( x ) { | |
return !isNaN( parseFloat( x ) ) && isFinite( x ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment