Use Bracket Notation to Find the NthtoLast Charactter in a String

Tell us what’s happening:

Your code so far

// Example
var firstName = "Ada";
var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];

// Setup
var lastName = "Lovelace";

// Only change code below this line
var secondToLastLetterOfLastName = lastName[lastName.length - 3];


Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36.

Link to the challenge:
https://www.freecodecamp.org/challenges/use-bracket-notation-to-find-the-nthtolast-character-in-a-string

You’re really close! Notice how the test is asking for the seconds to last letter, and adjust the number in secondToLastLetterOfLastName accordingly. Good luck!