Use Bracket Notation to Find the Nth-to-Last Character in a String trying to understand

Use Bracket Notation to Find the Nth-to-Last Character in a String trying to understand
0

Tell us what’s happening:
i dont understand how is 3 finding the letter in the last name?? i think i need more explanation on what it means by notation. i it same as indices or what??

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:

User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string

Hi StrayLove,
Nth-to-last character means(string.length-n)
Note:subtracting the n from the original string length

Notation: means it is the terminology. Don’t confuse.
we have two ways to getting the data

  1. dot notation(’.’)
  2. brocket notation(’’)