Created
October 3, 2019 16:58
-
-
Save parzibyte/f08a9a2f1229b8a6f9dfb281c7666b0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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