Skip to content

Instantly share code, notes, and snippets.

@ddo
Created November 22, 2012 08:33
Show Gist options
  • Save ddo/4129997 to your computer and use it in GitHub Desktop.
Save ddo/4129997 to your computer and use it in GitHub Desktop.
is number Javascript
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