Tell us what’s happening:
Use bracket notation to find the second-to-last character in the lastName
string.
Your code so far
// Setup
var lastName = "Lovelace";
// Only change code below this line
var secondToLastLetterOfLastName = lastName[lastName.lenght - 2]; // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
.
Challenge: Use Bracket Notation to Find the Nth-to-Last Character in a String
Link to the challenge: