Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jswhisperer/8258564 to your computer and use it in GitHub Desktop.

Select an option

Save jswhisperer/8258564 to your computer and use it in GitHub Desktop.
Verify that a given argument is a number
function isNumber(n){
return !isNaN(parseFloat(n)) && isFinite(n);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment