var firstName = "Charles"
, you can get the value of the last letter of the string by using firstName[firstName.length - 1]
.
Example:
```js
var firstName = "Charles";
var lastLetter = firstName[firstName.length - 1]; // lastLetter is "s"
```
lastName
variable.
Hint: Try looking at the example above if you get stuck.
lastLetterOfLastName
should be "e".
testString: assert(lastLetterOfLastName === "e");
- text: You should use .length
to get the last letter.
testString: assert(code.match(/\.length/g).length > 0);
```