Skip to content

Instantly share code, notes, and snippets.

@johnhutchins
Last active September 13, 2019 01:31
Show Gist options
  • Save johnhutchins/b4bc65d1017fe3aab2aeed96b292c401 to your computer and use it in GitHub Desktop.
Save johnhutchins/b4bc65d1017fe3aab2aeed96b292c401 to your computer and use it in GitHub Desktop.
is a character in a string an integer, useful in for loop, ie if(isNum(someArr[i]))...
function isNum(arg){
if(arg <= 9 && arg >= 1){
return true;
} else {
return false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment