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