Checks that length is used twice for JS bracket notation challenges; closes #3105

pull/3112/head
Aryan Jabbari 2015-09-06 00:37:12 -04:00
parent 0075bab84e
commit 2817ec49a9
1 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@
],
"tests": [
"assert(lastLetterOfLastName === \"e\", 'lastLetterOfLastName should be \"e\"');",
"assert(editor.getValue().match(/\\.length/g), 'You have to use <code>.length</code> to get the last letter');"
"assert(editor.getValue().match(/\\.length/g).length === 2, 'You have to use <code>.length</code> to get the last letter');"
],
"challengeSeed": [
"var firstName = \"Ada\";",
@ -253,7 +253,7 @@
],
"tests": [
"assert(secondToLastLetterOfLastName === 'c', 'secondToLastLetterOfLastName should be \"c\".');",
"assert(editor.getValue().match(/\\.length/g), 'You have to use .length to get the third last letter.');"
"assert(editor.getValue().match(/\\.length/g).length == 2, 'You have to use .length to get the third last letter.');"
],
"challengeSeed": [
"var firstName = \"Ada\";",