From dd65d8aeba2a52e3280e4c496be59a2c629d17cb Mon Sep 17 00:00:00 2001 From: Aryan Jabbari Date: Sat, 5 Sep 2015 20:10:14 -0400 Subject: [PATCH 1/4] Clarifies instructions for shift() challenge; closes #1875 --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 6b77ebac56..9dccea8951 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -604,7 +604,7 @@ "difficulty": "9.9817", "description": [ "pop() always removes the last element of an array. What if you want to remove the first? That's where .shift() comes in.", - "Take the myArray array and shift() the first value off of it." + "Take the myArray array and shift() the first value off of it. Set myRemoved to the first value of myArray using shift()." ], "tests": [ "assert((function(d){if(d[0] == 23 && d[1][0] == 'dog' && d[1][1] == 3 && d[2] == undefined){return true;}else{return false;}})(myArray), 'myArray should only have the last two values left([23, [\"dog\", 3]])');", From dd41aeba8fc07c45b01a56ce05fe339580777d82 Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Wed, 9 Sep 2015 10:02:08 +0800 Subject: [PATCH 2/4] Fixed typo in Basic Javascript Waypoint Waypoint 'Sift through Text with Regular Expressions' had `...` in its description instead of `.`. Made the required changes. closes #3169 --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 9dccea8951..b7c5ea2dc2 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1022,7 +1022,7 @@ "g means that we want to search the entire string for this pattern instead of just the first match.", "i means that we want to ignore the case (uppercase or lowercase) when searching for the pattern.", "Regular expressions are written by surrounding the pattern with a / symbol.", - "Let's try selecting all the occurrences of the word and in the string George Boole and Alan Turing went to the shop and got some milk. We can do this by replacing the ... part of our regular expression with the current regular expression with the word and." + "Let's try selecting all the occurrences of the word and in the string George Boole and Alan Turing went to the shop and got some milk. We can do this by replacing the . part of our regular expression with the current regular expression with the word and." ], "tests":[ "assert(test==2, 'Your regular expression should find two occurrences of the word and');", From a7111ab234c792abefd9361e049c07837e7e838a Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Wed, 9 Sep 2015 11:52:21 +0800 Subject: [PATCH 3/4] Fix typo in basic-javascript waypoint Waypoint 'Invert Regular Expression Matches with JavaScript' had a semi-colon in the description for the regex example which is not needed. closes #3148 --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index b7c5ea2dc2..b42dcf7db4 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1109,7 +1109,7 @@ "title": "Invert Regular Expression Matches with JavaScript", "difficulty":"9.987", "description":[ - "Use /\\S/gi; to match everything that isn't a space in the string.", + "Use /\\S/gi to match everything that isn't a space in the string.", "You can invert any match by using the uppercase version of the selector \\s versus \\S for example." ], "tests":[ From 1f6f337cfe6a63ec0c12327f02d52a04a84b9c6c Mon Sep 17 00:00:00 2001 From: Aniruddh Agarwal Date: Wed, 9 Sep 2015 11:44:53 +0800 Subject: [PATCH 4/4] Fixed wording error in HTML/CSS waypoint Waypoint 'Add Different Padding to Each Side of an Element' had a small wording error: the tests were missing `the` closes #3130 --- challenges/html5-and-css.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index 29bb0cae22..f67197acf5 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -2842,10 +2842,10 @@ "Give the green box a padding of 40px on its top and left side, but only 20px on its bottom and right side." ], "tests": [ - "assert($(\".green-box\").css(\"padding-top\") === \"40px\", 'Your green-box class should give the top of elements 40px of padding.')", - "assert($(\".green-box\").css(\"padding-left\") === \"40px\", 'Your green-box class should give the left of elements 40px of padding.')", - "assert($(\".green-box\").css(\"padding-right\") === \"20px\", 'Your green-box class should give the right of elements 20px of padding.')", - "assert($(\".green-box\").css(\"padding-bottom\") === \"20px\", 'Your green-box class should give the bottom of elements 20px of padding.')" + "assert($(\".green-box\").css(\"padding-top\") === \"40px\", 'Your green-box class should give the top of the elements 40px of padding.')", + "assert($(\".green-box\").css(\"padding-left\") === \"40px\", 'Your green-box class should give the left of the elements 40px of padding.')", + "assert($(\".green-box\").css(\"padding-right\") === \"20px\", 'Your green-box class should give the right of the elements 20px of padding.')", + "assert($(\".green-box\").css(\"padding-bottom\") === \"20px\", 'Your green-box class should give the bottom of the elements 20px of padding.')" ], "challengeSeed": [ "