Find the Char
Learn how to manipulate the characters in a string.
We'll cover the following...
We'll cover the following...
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 in the string
'Hello'.
In this example, the number ...