From 64267ce6c6654f3ad0dd6d5f7966439846a415c9 Mon Sep 17 00:00:00 2001 From: SaintPeter Date: Wed, 30 Dec 2015 13:18:48 -0800 Subject: [PATCH] Improve increment and decrement instructions, tests --- .../basic-javascript.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/challenges/01-front-end-development-certification/basic-javascript.json b/challenges/01-front-end-development-certification/basic-javascript.json index d8f1a5c093..f0ae23b709 100644 --- a/challenges/01-front-end-development-certification/basic-javascript.json +++ b/challenges/01-front-end-development-certification/basic-javascript.json @@ -393,6 +393,7 @@ "i++;", "is the equivalent of", "i = i + 1;", + "Note
The entire line becomes i++;, eliminating the need for the equal sign.", "

Instructions

", "Change the code to use the ++ operator on myVar" ], @@ -412,7 +413,7 @@ ], "tests": [ "assert(myVar === 88, 'message: myVar should equal 88');", - "assert(/[+]{2}/.test(code), 'message: Use the ++ operator');", + "assert(/myVar\\s*[+]{2}/.test(code), 'message: Use the ++ operator');", "assert(/var myVar = 87;/.test(code), 'message: Do not change code above the line');" ], "type": "waypoint", @@ -431,6 +432,7 @@ "i--;", "is the equivalent of", "i = i - 1;", + "Note
The entire line becomes i--;, eliminating the need for the equal sign.", "

Instructions

", "Change the code to use the -- operator on myVar" ], @@ -450,7 +452,7 @@ ], "tests": [ "assert(myVar === 10, 'message: myVar should equal 10');", - "assert(/myVar[-]{2}/.test(code), 'message: Use the -- operator on myVar');", + "assert(/myVar\\s*[-]{2}/.test(code), 'message: Use the -- operator on myVar');", "assert(/var myVar = 11;/.test(code), 'message: Do not change code above the line');" ], "type": "waypoint", @@ -5139,4 +5141,4 @@ "isBeta": "true" } ] -} +} \ No newline at end of file