Merge pull request #3112 from AryanJ-NYC/AryanJ-NYC-3105
Properly checks that .length() is used in JS brackets notation challenges
This commit is contained in:
@ -221,7 +221,7 @@
|
|||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(lastLetterOfLastName === \"e\", 'lastLetterOfLastName should be \"e\"');",
|
"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": [
|
"challengeSeed": [
|
||||||
"var firstName = \"Ada\";",
|
"var firstName = \"Ada\";",
|
||||||
@ -253,7 +253,7 @@
|
|||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(secondToLastLetterOfLastName === 'c', 'secondToLastLetterOfLastName should be \"c\".');",
|
"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": [
|
"challengeSeed": [
|
||||||
"var firstName = \"Ada\";",
|
"var firstName = \"Ada\";",
|
||||||
|
Reference in New Issue
Block a user