javascript - Converting ascii to text -


How do I take an ASCII code and convert it to my character using Javascript? I am in the nested loop and need to label each loop 1A, 2A, 1B, 2B, etc., and I would like to save every character from code coding using the statements.

You can use

  String.fromCharCode (ascii_value)   

This is a plain JavaScript though. If you want to use the hex number, then convert them to decimal before using parseInt, such as:

  parseInt ("ff", 16)    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -