The basics
Fancier stuff
Specialized things
eval(string) converts string of digits (or an expression) to number Useful for reading form elements on a page (which by default are read as strings). if string="12345" then eval(string)=12345. |
string |
eval(string) |
|
eval(numberstring).toString(16) converts number to hexadecimal if numberstring=255 |
number |
number.toString(16) |
|
Numeric to ASCII |
number |
String.fromCharCode(number) |
|
ASCII to Numeric |
ASCIIchar |
number=ASCIIchar.charCodeAt(0) |
|
escape(string) replaces special characters by escape sequences |
|
escape(string) |