Skip to content

Instantly share code, notes, and snippets.

@ohcrider
Last active November 4, 2015 18:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ohcrider/8f83f43b2beccb5fa01f to your computer and use it in GitHub Desktop.
Save ohcrider/8f83f43b2beccb5fa01f to your computer and use it in GitHub Desktop.
javascript check int number
function isIntNumber(value) {
var numberRe = /^-?[0-9]+$/;
return typeof(value) === 'number' && numberRe.test(value);
}
@fdgogogo
Copy link

fdgogogo commented Nov 4, 2015

parseInt()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment