Sunday, November 14, 2021

JavaScript Character to ASCII Using String.charCodeAt() Function

1. Overview

In this tutorial, we will learn how to use the String object charCodeAt() function in javascript.

String.charCodeAt() function is used to convert the character to ascii code.

This method returns the integer value that is in the range from 0 to 65535 representing the UTF 16 standard code.

2. Syntax of String.charCodeAt()


Below is the syntax
charCodeAt(index)
Unicode points range from 0 to 1114111. The first 128 codes denote the ascii characters.