Javascript charCodeAt() String Method

Last Updated Jul 29, 2015, 07:00:14 PM






The JavaScript charCodeAt() method returns the numeric Unicode value of the character at the given index

Syntax

where index is start from 0 to string lenght -1.

Parameters

where index should not be less than the 1. It returns NaN if the index less than 1.

The following example explains the usage of charCodeAt() method. Here it will display various results based on specified index.


Example
Try It Now



Sources and Credits

The source of the content has been referred and updated with Mozilla Developer Network and W3C Organization

Last Updated Jul 29, 2015, 07:00:14 PM



Browser compatibility

Feature
charCodeAt() Yes Yes Yes Yes Yes Yes Yes