How can I convert a character to its ASCII code using JavaScript? For example: get 10 from “\n”. 15 s 15 "\n".charCodeAt(0); Tags: javascript