Here’s the basic set up, with what probably makes the most sense in almost any situation.
var charCode = 65; String.fromCharCode(charCode) // => "A"
Where to go from here? It seems, at first that there is no other way to achieve this, right? Wrong, of course.
xAB, where AB is a hexadecimal character code:
eval("'\x"+charCode.toString(16)+"'") // => "A"
An here’s a third way to do it, using the unescape DOM method:
unescape('%'+charCode.toString(16)) // => "A"
There are even more possible ways to achieve this conversion—try to find one!Tweet