Please help me out about the "Use Bracket Notation to Find the Nth-to-Last Character in a String"

**Hello everyone, here is my code below and i have no idea what is wrong with that. Could anyone please help me here? **

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.lenght - 2];

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36.

Link to the challenge:

You have said lastName.lenght instead of lastName.length.

oh my gosh mate :sob: really wanna cry now , thanks very much indeed !!!

Don’t worry too much about this kind of thing. It happens to everyone. And I mean everyone. It’s part of the process.

It’s can be frustrating, but the frustration does help you learn. I think of it like the proverbial touching a burning object of coding. Every time you spend hours over a minor typo you learn not to touch that particular ‘stove’ again.

That being said, code linters are a godsend…


1 Like