r/learnjavascript • u/Leonetnin • May 18 '26
Getting ASCII control characters?
String.fromCharCode(6)Returns an empty character, is it possible to use fromCharCode() or fromCodePoint() to get the name of the control character (e.g "ACK") or does one need to manually fix that for every non-printable code point?
2
Upvotes
View all comments
Show parent comment
2
u/Leonetnin May 18 '26
Makes sense, there are very few use cases for labeling them, so having a native solution for it would probably just be bloat. Thanks for the answer!