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:

Leave a Reply

Your email address will not be published. Required fields are marked *