Кто шарит хоть чуть-чуть в JavaScript и понимает английский язык-помогите. (Вопрос внутри)
Это задание из онлайн учебника по JavaScript
Selecting Characters
Imagine that you have a list of strings containing words and you want to sort them alphabetically. You'll need a way to get the first character in each string. You might even need the second or third character if there are multiple words with the same first letter.
The charAt(index) is a handy way to get the character at a specific position in a string. Keep in mind that strings are zero-indexed, meaning the first position is position 0, the next one is position 1, and the last position can be calculated by taking the string's length and subtracting 1.
For example, we can get the character at position 2 in the string "hello" by doing "hello".charAt(2).
What is the last character in the string stored in the variable ls? Что они от меня хотят?
P.S. что делает команда .charAt