var firstName = "Charles"
, você pode obter o valor da última letra da string usando firstName[firstName.length - 1]
. lastName
. Sugestão lastLetterOfFirstName
se você ficar preso. lastLetterOfLastName
deve ser "e".
testString: 'assert(lastLetterOfLastName === "e", "lastLetterOfLastName
should be "e".");'
- text: Você tem que usar o .length
para obter a última letra.
testString: 'assert(code.match(/\.length/g).length === 2, "You have to use .length
to get the last letter.");'
```