var firstName = "Charles"
中,你可以这样操作firstName[firstName.length - 1]
来得到字符串的最后的一个字符。
lastLetterOfFirstName
变量上是怎么做的。
lastLetterOfLastName
应该是"e"。
testString: assert(lastLetterOfLastName === "e");
- text: 你需要使用.length
获取最后一个字符。
testString: assert(code.match(/\.length/g).length === 2);
```