Try answering but couldn't get it correctly

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:

You have a small typo here.

when you get tests incorrect, try checking for errors in the console and log the results into the console, cuz creating a post on a little error that you could’ve easily fixed yourself takes time. it’s covered in the debbuging section but i did it myself when i just started