Skip to content

Instantly share code, notes, and snippets.

@pepijnolivier
Created August 12, 2019 13:21
Show Gist options
  • Save pepijnolivier/c959badba3ceefacad183558cfce949f to your computer and use it in GitHub Desktop.
Save pepijnolivier/c959badba3ceefacad183558cfce949f to your computer and use it in GitHub Desktop.
Test whether or not a variable is a number in javascript
function isNumber(input) {
return !isNaN(+input);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment