Find the Char

Learn how to manipulate the characters in a string.

Accessing individual characters in a string

Even though JavaScript doesn’t have a char data type, it can still separate each string into individual characters.

We can find out a particular character in a string by using the charAt() method. We can apply methods to strings using dot notation. This involves writing a dot (.) followed by the method we want to use. For example, the following code will tell us which character is at position 11 in the string 'Hello'.

Get hands-on with 1400+ tech skills courses.