---
id: bd7123c9c452eddfaeb5bdef
title: Use Bracket Notation to Find the Nth-to-Last Character in a String
challengeType: 1
videoUrl: ''
localeTitle: ''
---
## Description
undefined
## Instructions
undefined
## Tests
```yml
tests:
- text: ''
testString: 'assert(secondToLastLetterOfLastName === "c", "secondToLastLetterOfLastName should be "c".");'
- text: ''
testString: 'assert(code.match(/\.length/g).length === 2, "You have to use .length to get the second last letter.");'
```
## Challenge Seed
```js
// Example
var firstName = "Ada";
var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];
// Setup
var lastName = "Lovelace";
// Only change code below this line
var secondToLastLetterOfLastName = lastName;
```