PDA

View Full Version : How do i convert a number into a char (Javascript))



troelsy
18 May 2010, 03:20 PM
I need to convert the number 1 (just an example) to char '1', is the possible?

Asperon
18 May 2010, 04:13 PM
just add the number to an empty string



var a = 100;
alert(typeof(a)); // outputs "number"
a += '';
alert(typeof(a)); // outputs "string"