Timeline for Javascript character (ASCII) to Hex
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 25, 2019 at 21:20 | history | edited | Sandra Rossi | CC BY-SA 4.0 |
Integrate comment into answer
|
Aug 23, 2016 at 22:19 | comment | added | John Allsup |
Just to alert you, if your string contains any character codes below 16, an extra step is needed to zero pad. An example if how to do this is var c = a.charCodeAt(i);var d = "00"+c.toString(16);var e = d.substr(d.length-2);
|
|
Jan 28, 2016 at 23:36 | comment | added | swade |
.toString(10) is decimal
|
|
Aug 20, 2014 at 6:54 | comment | added | etoxin | you can also do .toString(36) which is base 36 which includes letters past 9. I think .toString(2) is to binary. | |
Dec 14, 2013 at 19:59 | vote | accept | StealthRT | ||
Dec 14, 2013 at 5:41 | comment | added | thefourtheye |
@StealthRT 16 means base 16, which is hexadecimal.
|
|
Dec 14, 2013 at 5:41 | comment | added | StealthRT | What does the (16) do? | |
Dec 14, 2013 at 5:38 | history | answered | thefourtheye | CC BY-SA 3.0 |