tags:

views:

618

answers:

2

In JavaScript, how can you get a string representation of an ASCII value.

e.g. how to turn 65 into "A"?

+7  A: 

fromCharCode method converts ascii to char :

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

hope this helps !

Canavar
Thanks for your answer friend
Sakthivel
@sakthiopr, you may mark his answer as correct. There's a little check right below the downvote arrow.
Ionuț G. Stan
@sakthiopr, its really bad not to mark as accepted answer. Make it a practice to mark the answer as accepted once your purpose is served. It helps others too in many ways.
Chandan .
+1  A: 

The method you're looking for is String.fromCharCode (http://www.w3schools.com/jsref/jsref_fromCharCode.asp).

jonnii