Below is the example of the string.codePointAt() Method.
b = a.codePointAt(1);
List of code point values of different elements:
Parameters: It accepts a parameter which shows the index of an element in the string. Index starts form zero (0).
Return Values: It returns the code point value of the element which is denoted by a parameter in the string. It returns undefined if there is no element present at the specified location i.e, at “A”th index.
103 102 103
Note: Output is undefined because in “gfg” there is no element at 4th index.
- Google Chrome
- Internet Explorer
- Apple Safari