Last active
July 4, 2025 11:49
-
-
Save MarcelloDiSimone/3c9bba769e61026ab378f265d75daf62 to your computer and use it in GitHub Desktop.
arithmetic to lowercase
This file contains hidden or 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
const uppercase = s => [...s].map(c =>(n = c.charCodeAt(0), String.fromCharCode(n - 32 * (n >= 97 && n <= 122)))).join(''); | |
console.log(uppercase('a4raf32aso"§%&/fu4f22')) // "A4RAF32ASO'§%&/FU4F22" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment