How to create a string or char from an ASCII value in JavaScript?
JavascriptAsciiJavascript Problem Overview
In JavaScript, how to get a string representation of an ASCII value, e.g. how to turn 65
into A
?
Javascript Solutions
Solution 1 - Javascript
The fromCharCode method converts ASCII to a string:
<script type="text/javascript">
document.write(String.fromCharCode(65,66,67)); // ABC
</script>
Hope this helps!
Solution 2 - Javascript
A reference for those of us that don't like w3schools ;)
Usage:
var myAString = String.fromCharCode(65)
Solution 3 - Javascript
The method you're looking for is String.fromCharCode (http://www.w3schools.com/jsref/jsref_fromCharCode.asp).