How to create a string or char from an ASCII value in JavaScript?

Viewed 95101

In JavaScript, how to get a string representation of an ASCII value, e.g. how to turn 65 into A?

3 Answers

The fromCharCode method converts ASCII to a string:

<script type="text/javascript">
document.write(String.fromCharCode(65,66,67)); // ABC
</script>

Hope this helps!

Related