Last active
October 29, 2016 17:31
-
-
Save thekevinscott/c6d7511bb078dfda54785974ddf8d0de 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
// From string to decimal code point | |
'A'.codePointAt(0) | |
> 65 | |
// From decimal to hexadecimal code point | |
Number(65).toString(16); | |
> 41 | |
// From hexadecimal to decimal code point | |
parseInt('41',16) | |
> 65 | |
// alternatively | |
0x0041 | |
> 65 | |
// From decimal code point to string | |
String.fromCodePoint(65) | |
> 'A' | |
// From hexadecimal code point to string | |
'\u0041' | |
> 'A' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment