From 17f719de19eae0f2c8fa36bcd497b1ce203e27ee Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Thu, 8 Sep 2016 14:54:54 -0700 Subject: [PATCH] Fix(challenge): Escaping Quote Changes the number of matches from the regex to accomodate the additions added through babel and head/tail. Also changes tail to use console.log to print out info --- .../basic-javascript.json | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index 22cac7bc2f..2699ca6137 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -1074,24 +1074,22 @@ ], "releasedOn": "January 1, 2016", "challengeSeed": [ - "var myStr; // Change this line", + "var myStr = \"\"; // Change this line", "", "" ], "tail": [ "(function(){", " if(typeof myStr === 'string') {", - " return \"myStr = \" + myStr;", + " console.log(\"myStr = \\\"\" + myStr + \"\\\"\");", " } else {", - " return \"myStr is undefined\";", + " console.log(\"myStr is undefined\");", " }", "})();" ], - "solutions": [ - "var myStr = \"I am a \\\"double quoted\\\" string inside \\\"double quotes\\\".\";" - ], + "solutions": [], "tests": [ - "assert(code.match(/\\\\\"/g).length === 4 && code.match(/[^\\\\]\"/g).length === 2, 'message: You should use two double quotes (") and four escaped double quotes (\").');", + "assert(code.match(/\\\\\"/g).length === 6 && code.match(/[^\\\\]\"/g).length === 10, 'message: You should use two double quotes (") and four escaped double quotes (\").');", "assert(myStr === \"I am a \\\"double quoted\\\" string inside \\\"double quotes\\\".\", 'message: Variable myStr should contain the string: I am a \"double quoted\" string inside \"double quotes\".');" ], "type": "waypoint",