Character access There are two ways to access an individual character in a string. The first is the charAt method:
return 'cat'.charAt(1); // returns "a"
The other way is to treat the string as an array-like object, where individual characters correspond to a numerical index:
return 'cat'; // returns "a"