JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Converting between Characters and Character Codes

The characters a program stores internally are stored using Unicode character codes; for example, the character code 65 stands for "A". How can you convert back and forth between characters and character codes? You can use the Asc and Chr functions:

  • Asc— Takes a character and returns its character code. For example, Asc("A") returns 65.

  • Chr— Takes a character code and returns the corresponding character. For example, Chr(65) returns "A".

Previous Section Next Section

JavaScript Editor Free JavaScript Editor     JavaScript Editor