Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created October 3, 2019 16:58
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 parzibyte/f08a9a2f1229b8a6f9dfb281c7666b0b to your computer and use it in GitHub Desktop.
Save parzibyte/f08a9a2f1229b8a6f9dfb281c7666b0b to your computer and use it in GitHub Desktop.
/**
* Saber si carácter es dígito con JavaScript
*
* https://parzibyte.me/blog
*
*/
const esDigito = (caracter) => {
let ascii = caracter.charCodeAt(0);
return ascii > 47 && ascii < 58;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment