Javascript charAt() String Method

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

The JavaScript charAt() method in JavaScript is used to identifying particular character by specifying the index. This method returns the character.

Characters in a string are indexed from left to right. The index of the first character is 0, and the index of the last character in a string called stringName is stringName.length - 1.




An integer between 0 and 1-less-than the length of the string.

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


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

charAt() Yes Yes Yes Yes Yes Yes Yes