Basic JavaScript (35/111) | Use Bracket Notation to Find the Nth to Last Character in a String

preview_player
Показать описание
Basic JavaScript (35/111) | Use Bracket Notation to Find the Nth to Last Character in a String | freeCodeCamp

You can use the same principle we just used to retrieve the last character in a string to retrieve the Nth-to-last character.

Example:
var firstName = "Charles";
Рекомендации по теме