firstName[firstName.length - 3]
获取var firstName = "Charles"
字符串的倒数第三个字母的值lastName
字符串中倒数第二个字符。 暗示 thirdToLastLetterOfFirstName
变量声明。 secondToLastLetterOfLastName
应为“c”。
testString: 'assert(secondToLastLetterOfLastName === "c", "secondToLastLetterOfLastName
should be "c".");'
- text: 你必须使用.length
来获得倒数第二个字母。
testString: 'assert(code.match(/\.length/g).length === 2, "You have to use .length
to get the second last letter.");'
```