diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.english.md index c5b2a35216..f88ff6a465 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/build-javascript-objects.english.md @@ -67,16 +67,6 @@ tests:
```js -// Example -var ourDog = { - "name": "Camper", - "legs": 4, - "tails": 1, - "friends": ["everything!"] -}; - -// Only change code below this line - var myDog = { diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.english.md index 6ca9ec9792..36eed3f7a8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.english.md @@ -57,9 +57,9 @@ var myObj = { }; function checkObj(checkProp) { - // Your Code Here - + // Only change code below this line return "Change Me!"; + // Only change code above this line } checkObj("gift"); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable.english.md index fc5f7151fa..4a72d21d74 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable.english.md @@ -40,7 +40,7 @@ tests: let a = 5; let b = 1; a++; -// Add your code below this line +// Only change code below this line let sumAB = a + b; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-typeof-to-check-the-type-of-a-variable.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-typeof-to-check-the-type-of-a-variable.english.md index 21fd4bd0b7..25497f96f7 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-typeof-to-check-the-type-of-a-variable.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/debugging/use-typeof-to-check-the-type-of-a-variable.english.md @@ -50,7 +50,7 @@ tests: let seven = 7; let three = "3"; console.log(seven + three); -// Add your code below this line +// Only change code below this line ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.english.md index 5bef8eae60..89d30408a8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.english.md @@ -56,7 +56,7 @@ function editInPlace() { 'use strict'; // Only change code below this line - // s = [2, 5, 7]; <- this is invalid + // Using s = [2, 5, 7] would be invalid // Only change code above this line } diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/set-default-parameters-for-your-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/set-default-parameters-for-your-functions.english.md index 6ef6e1e18f..555f79b8c1 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/set-default-parameters-for-your-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/set-default-parameters-for-your-functions.english.md @@ -47,10 +47,9 @@ tests:
```js +// Only change code below this line const increment = (number, value) => number + value; - -console.log(increment(5, 2)); // returns 7 -console.log(increment(5)); // returns 6 +// Only change code above this line ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-arrays.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-arrays.english.md index e328e110f0..98f31c4779 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-arrays.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-arrays.english.md @@ -56,9 +56,6 @@ tests: let a = 8, b = 6; // Only change code below this line -// Only change code above this line -console.log(a); // should be 6 -console.log(b); // should be 8 ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects.english.md index a9de381ef6..8fceb1ce80 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-nested-objects.english.md @@ -50,6 +50,8 @@ tests: testString: assert(code.match(/(var|const|let)\s*{\s*today\s*:\s*{\s*(low\s*:\s*lowToday[^}]*|[^,]*,\s*low\s*:\s*lowToday\s*)}\s*}\s*=\s*LOCAL_FORECAST(;|\s+|\/\/)/g)); - text: You should use destructuring to create the highToday variable. testString: assert(code.match(/(var|const|let)\s*{\s*today\s*:\s*{\s*(high\s*:\s*highToday[^}]*|[^,]*,\s*high\s*:\s*highToday\s*)}\s*}\s*=\s*LOCAL_FORECAST(;|\s+|\/\/)/g)); + - text: lowToday should be equal to 64 and highToday should be equal to 77. + testString: assert(lowToday === 64 && highToday === 77); ``` @@ -71,9 +73,6 @@ const lowToday = LOCAL_FORECAST.today.low; const highToday = LOCAL_FORECAST.today.high; // Only change code above this line - -console.log(lowToday); // should be 64 -console.log(highToday); // should be 77 ``` @@ -88,11 +87,8 @@ const LOCAL_FORECAST = { today: { low: 64, high: 77 }, tomorrow: { low: 68, high: 80 } }; - + const { today: { low: lowToday, high: highToday }} = LOCAL_FORECAST; - -console.log(highToday); // should be 77 -console.log(highTomorrow); // should be 80 ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md index bd3123aab1..2f209530dd 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-assign-variables-from-objects.english.md @@ -41,6 +41,8 @@ tests: testString: assert(code.match(/(var|const|let)\s*{\s*(today\s*:\s*highToday[^}]*|[^,]*,\s*today\s*:\s*highToday\s*)}\s*=\s*HIGH_TEMPERATURES(;|\s+|\/\/)/g)); - text: You should use destructuring to create the highTomorrow variable. testString: assert(code.match(/(var|const|let)\s*{\s*(tomorrow\s*:\s*highTomorrow[^}]*|[^,]*,\s*tomorrow\s*:\s*highTomorrow\s*)}\s*=\s*HIGH_TEMPERATURES(;|\s+|\/\/)/g)); + - text: highToday should be equal to 77 and highTomorrow should be equal to 80. + testString: assert(highToday === 77 && highTomorrow === 80); ``` @@ -62,10 +64,6 @@ const highToday = HIGH_TEMPERATURES.today; const highTomorrow = HIGH_TEMPERATURES.tomorrow; // Only change code above this line - -console.log(yesterday) // should be not defined -console.log(highToday); // should be 77 -console.log(highTomorrow); // should be 80 ``` @@ -82,9 +80,6 @@ const HIGH_TEMPERATURES = { }; const { today: highToday, tomorrow: highTomorrow } = HIGH_TEMPERATURES; - -console.log(highToday); // should be 77 -console.log(highTomorrow); // should be 80 ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-extract-values-from-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-extract-values-from-objects.english.md index c0e29f673b..d04a619427 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-extract-values-from-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-extract-values-from-objects.english.md @@ -46,6 +46,8 @@ tests: testString: assert(code.match(/(var|let|const)\s*{\s*(today[^}]*|[^,]*,\s*today)\s*}\s*=\s*HIGH_TEMPERATURES(;|\s+|\/\/)/g)); - text: You should use destructuring to create the tomorrow variable. testString: assert(code.match(/(var|let|const)\s*{\s*(tomorrow[^}]*|[^,]*,\s*tomorrow)\s*}\s*=\s*HIGH_TEMPERATURES(;|\s+|\/\/)/g)); + - text: today should be equal to 77 and tomorrow should be equal to 80. + testString: assert(today === 77 && tomorrow === 80); ``` @@ -67,10 +69,6 @@ const today = HIGH_TEMPERATURES.today; const tomorrow = HIGH_TEMPERATURES.tomorrow; // Only change code above this line - -console.log(yesterday) // should be not defined -console.log(today); // should be 77 -console.log(tomorrow); // should be 80 ``` @@ -87,10 +85,6 @@ const HIGH_TEMPERATURES = { }; const { today, tomorrow } = HIGH_TEMPERATURES; - -console.log(yesterday) // should be not defined -console.log(today); // should be 77 -console.log(tomorrow); // should be 80 ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters.english.md index 380376ba23..290ed50c49 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-to-pass-an-object-as-a-functions-parameters.english.md @@ -67,13 +67,10 @@ const stats = { average: 35.85 }; -// Use function argument destructuring // Only change code below this line const half = (stats) => (stats.max + stats.min) / 2.0; // Only change code above this line -console.log(stats); // should be object -console.log(half(stats)); // should be 28.015 ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.english.md index a34f81028c..68e6b3335a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.english.md @@ -32,6 +32,8 @@ Use destructuring assignment with the rest parameter to perform an effective arr should be [3,4,5,6,7,8,9,10] testString: assert(arr.every((v, i) => v === i + 3) && arr.length === 8); + - text: source should be [1,2,3,4,5,6,7,8,9,10] + testString: assert(source.every((v, i) => v === i + 1) && source.length === 10); - text: Array.slice() should not be used. testString: getUserInput => assert(!getUserInput('index').match(/slice/g)); - text: Destructuring on list should be used. @@ -50,14 +52,13 @@ tests: const source = [1,2,3,4,5,6,7,8,9,10]; function removeFirstTwo(list) { "use strict"; - // change code below this line - const arr = list; // change this - // change code above this line + // Only change code below this line + const arr = list; // Change this line + // Only change code above this line return arr; } const arr = removeFirstTwo(source); -console.log(arr); // should be [3,4,5,6,7,8,9,10] -console.log(source); // should be [1,2,3,4,5,6,7,8,9,10]; + ``` @@ -73,9 +74,7 @@ console.log(source); // should be [1,2,3,4,5,6,7,8,9,10]; const source = [1,2,3,4,5,6,7,8,9,10]; function removeFirstTwo(list) { "use strict"; - // change code below this line const [, , ...arr] = list; - // change code above this line return arr; } const arr = removeFirstTwo(source); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.english.md index fec340f2d4..eed16750eb 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/use-getters-and-setters-to-control-access-to-an-object.english.md @@ -79,10 +79,10 @@ tests: // Only change code above this line -const thermos = new Thermostat(76); // setting in Fahrenheit scale -let temp = thermos.temperature; // 24.44 in C +const thermos = new Thermostat(76); // Setting in Fahrenheit scale +let temp = thermos.temperature; // 24.44 in Celsius thermos.temperature = 26; -temp = thermos.temperature; // 26 in C +temp = thermos.temperature; // 26 in Celsius ``` @@ -107,10 +107,10 @@ class Thermostat { } } -const thermos = new Thermostat(76); // setting in Fahrenheit scale -let temp = thermos.temperature; // 24.44 in C +const thermos = new Thermostat(76); // Setting in Fahrenheit scale +let temp = thermos.temperature; // 24.44 in Celsius thermos.temperature = 26; -temp = thermos.temperature; // 26 in C +temp = thermos.temperature; // 26 in Celsius ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.english.md index 0c369e1ab7..9234dbbcaf 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.english.md @@ -62,7 +62,6 @@ const createPerson = (name, age, gender) => { }; // Only change code above this line }; -console.log(createPerson("Zodiac Hasbro", 56, "male")); // returns a proper object ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.english.md index b33690e191..43485eae8b 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.english.md @@ -52,10 +52,10 @@ tests: ```js function nonMutatingPush(original, newItem) { - // Add your code below this line + // Only change code below this line return original.push(newItem); - // Add your code above this line + // Only change code above this line } var first = [1, 2, 3]; var second = [4, 5]; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md index 33a8aacc36..5f3699fb79 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.english.md @@ -49,15 +49,15 @@ tests:
```js -// the global variable +// The global variable var globalTitle = "Winter Is Coming"; -// Add your code below this line +// Only change code below this line function urlSlug(title) { } -// Add your code above this line +// Only change code above this line var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming" ``` @@ -72,16 +72,13 @@ var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming"
```js -// the global variable +// The global variable var globalTitle = "Winter Is Coming"; -// Add your code below this line +// Only change code below this line function urlSlug(title) { return title.trim().split(/\s+/).join("-").toLowerCase(); } -// Add your code above this line - -var winterComing = urlSlug(globalTitle); // Should be "winter-is-coming" ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.english.md index f6fb8e619a..59baf10d09 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.english.md @@ -40,14 +40,14 @@ tests:
```js -// the global variable +// The global variable var fixedValue = 4; function incrementer () { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } var newValue = incrementer(); // Should equal 5 diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.english.md index 60c47582f0..d94bb3c41c 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.english.md @@ -52,10 +52,10 @@ tests: ```js function sentensify(str) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } sentensify("May-the-force-be-with-you"); ``` @@ -71,9 +71,9 @@ sentensify("May-the-force-be-with-you"); ```js function sentensify(str) { - // Add your code below this line + // Only change code below this line return str.split(/\W/).join(' '); - // Add your code above this line + // Only change code above this line } ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.english.md index 4d81339e76..3b4097d315 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.english.md @@ -46,10 +46,10 @@ tests: ```js function nonMutatingConcat(original, attach) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } var first = [1, 2, 3]; var second = [4, 5]; @@ -67,9 +67,9 @@ nonMutatingConcat(first, second); ```js function nonMutatingConcat(original, attach) { - // Add your code below this line + // Only change code below this line return original.concat(attach); - // Add your code above this line + // Only change code above this line } var first = [1, 2, 3]; var second = [4, 5]; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.english.md index 8e607c4156..b0589dc2e8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.english.md @@ -38,14 +38,14 @@ tests:
```js -// the global Array +// The global variable var s = [23, 65, 98, 5]; Array.prototype.myMap = function(callback){ var newArray = []; - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line return newArray; }; @@ -70,11 +70,11 @@ var s = [23, 65, 98, 5]; Array.prototype.myMap = function(callback){ var newArray = []; - // Add your code below this line + // Only change code below this line for (var elem of this) { newArray.push(callback(elem)); } - // Add your code above this line + // Only change code above this line return newArray; }; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.english.md index 5cf5b62fe1..7132270886 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.english.md @@ -36,14 +36,13 @@ tests:
```js -// the global Array +// The global variable var s = [23, 65, 98, 5]; Array.prototype.myFilter = function(callback){ + // Only change code below this line var newArray = []; - // Add your code below this line - - // Add your code above this line + // Only change code above this line return newArray; }; @@ -68,12 +67,12 @@ var s = [23, 65, 98, 5]; Array.prototype.myFilter = function(callback){ var newArray = []; - // Add your code below this line + // Only change code below this line for (let i = 0;i { // Only change code below this line const tea4TeamFCC = null; // Only change code above this line - -console.log(tea4TeamFCC); ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md index 8adff8d956..e1412c8116 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.english.md @@ -43,14 +43,14 @@ tests:
```js -// the global variable +// The global variable var fixedValue = 4; -// Add your code below this line +// Only change code below this line function incrementer () { - // Add your code above this line + // Only change code above this line } var newValue = incrementer(fixedValue); // Should equal 5 @@ -67,7 +67,7 @@ console.log(fixedValue); // Should print 4
```js -// the global variable +// The global variable var fixedValue = 4; const incrementer = val => val + 1; diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.english.md index fe0cf15e08..db04a3bb9b 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.english.md @@ -45,7 +45,7 @@ tests:
```js -// the global variable +// The global variable var bookList = ["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "PhilosophiƦ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]; // Change code below this line diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.english.md index 77b263ca4b..3d06097ed3 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.english.md @@ -49,10 +49,10 @@ tests: ```js function nonMutatingSplice(cities) { - // Add your code below this line + // Only change code below this line return cities.splice(3); - // Add your code above this line + // Only change code above this line } var inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; nonMutatingSplice(inputCities); @@ -69,9 +69,9 @@ nonMutatingSplice(inputCities); ```js function nonMutatingSplice(cities) { - // Add your code below this line + // Only change code below this line return cities.slice(0,3); - // Add your code above this line + // Only change code above this line } var inputCities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; nonMutatingSplice(inputCities); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.english.md index 79d808ed08..cab7bcca44 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.english.md @@ -43,10 +43,10 @@ tests: ```js var globalArray = [5, 6, 3, 2, 9]; function nonMutatingSort(arr) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } nonMutatingSort(globalArray); ``` @@ -63,9 +63,9 @@ nonMutatingSort(globalArray); ```js var globalArray = [5, 6, 3, 2, 9]; function nonMutatingSort(arr) { - // Add your code below this line + // Only change code below this line return [].concat(arr).sort((a,b) => a-b); - // Add your code above this line + // Only change code above this line } nonMutatingSort(globalArray); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.english.md index 5ed6d4b541..15dfdca834 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.english.md @@ -50,10 +50,10 @@ tests: ```js function sliceArray(anim, beginSlice, endSlice) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } var inputAnim = ["Cat", "Dog", "Tiger", "Zebra", "Ant"]; sliceArray(inputAnim, 1, 3); @@ -70,9 +70,9 @@ sliceArray(inputAnim, 1, 3); ```js function sliceArray(anim, beginSlice, endSlice) { - // Add your code below this line + // Only change code below this line return anim.slice(beginSlice, endSlice) - // Add your code above this line + // Only change code above this line } var inputAnim = ["Cat", "Dog", "Tiger", "Zebra", "Ant"]; sliceArray(inputAnim, 1, 3); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.english.md index f6e829fcf4..afc7cf3743 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.english.md @@ -65,10 +65,10 @@ tests: ```js function alphabeticalOrder(arr) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } alphabeticalOrder(["a", "d", "c", "a", "z", "g"]); ``` @@ -84,9 +84,9 @@ alphabeticalOrder(["a", "d", "c", "a", "z", "g"]); ```js function alphabeticalOrder(arr) { - // Add your code below this line + // Only change code below this line return arr.sort(); - // Add your code above this line + // Only change code above this line } alphabeticalOrder(["a", "d", "c", "a", "z", "g"]); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.english.md index 0559c90b4a..3d7f20da6a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.english.md @@ -53,10 +53,10 @@ tests: ```js function splitify(str) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } splitify("Hello World,I-am code"); ``` @@ -72,9 +72,9 @@ splitify("Hello World,I-am code"); ```js function splitify(str) { - // Add your code below this line + // Only change code below this line return str.split(/\W/); - // Add your code above this line + // Only change code above this line } ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.english.md index cde9671a30..4317257488 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.english.md @@ -50,10 +50,10 @@ tests: ```js function checkPositive(arr) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } checkPositive([1, 2, 3, -4, 5]); ``` @@ -69,9 +69,9 @@ checkPositive([1, 2, 3, -4, 5]); ```js function checkPositive(arr) { - // Add your code below this line + // Only change code below this line return arr.every(num => num > 0); - // Add your code above this line + // Only change code above this line } checkPositive([1, 2, 3, -4, 5]); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.english.md index 59645d4c07..ae5b3a6afd 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.english.md @@ -54,7 +54,7 @@ tests:
```js -// the global variable +// The global variable var watchList = [ { "Title": "Inception", @@ -168,11 +168,11 @@ var watchList = [ } ]; -// Add your code below this line +// Only change code below this line var filteredList; -// Add your code above this line +// Only change code above this line console.log(filteredList); ``` @@ -187,7 +187,7 @@ console.log(filteredList);
```js -// the global variable +// The global variable var watchList = [ { "Title": "Inception", @@ -301,9 +301,9 @@ var watchList = [ } ]; -// Add your code below this line +// Only change code below this line let filteredList = watchList.filter(e => e.imdbRating >= 8).map( ({Title: title, imdbRating: rating}) => ({title, rating}) ); -// Add your code above this line +// Only change code above this line ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.english.md index 74948db906..95748fc074 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.english.md @@ -57,7 +57,7 @@ tests:
```js -// the global variable +// The global variable var watchList = [ { "Title": "Inception", @@ -171,14 +171,14 @@ var watchList = [ } ]; -// Add your code below this line +// Only change code below this line var ratings = []; for(var i=0; i < watchList.length; i++){ ratings.push({title: watchList[i]["Title"], rating: watchList[i]["imdbRating"]}); } -// Add your code above this line +// Only change code above this line console.log(JSON.stringify(ratings)); ``` @@ -200,7 +200,7 @@ const removeJSComments = str => str.replace(/\/\*[\s\S]*?\*\/|\/\/.*$/gm, '');
```js -// the global variable +// The global variable var watchList = [ { "Title": "Inception", diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.english.md index 568f6fdb2f..0cf9f756c9 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.english.md @@ -79,7 +79,7 @@ tests:
```js -// the global variable +// The global variable var watchList = [ { "Title": "Inception", @@ -194,11 +194,11 @@ var watchList = [ ]; function getRating(watchList){ - // Add your code below this line + // Only change code below this line var averageRating; - // Add your code above this line + // Only change code above this line return averageRating; } console.log(getRating(watchList)); @@ -214,7 +214,7 @@ console.log(getRating(watchList));
```js -// the global variable +// The global variable var watchList = [ { "Title": "Inception", diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.english.md index b762b9eb29..65bbdba77d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.english.md @@ -50,10 +50,10 @@ tests: ```js function checkPositive(arr) { - // Add your code below this line + // Only change code below this line - // Add your code above this line + // Only change code above this line } checkPositive([1, 2, 3, -4, 5]); ``` @@ -69,9 +69,9 @@ checkPositive([1, 2, 3, -4, 5]); ```js function checkPositive(arr) { - // Add your code below this line + // Only change code below this line return arr.some(elem => elem > 0); - // Add your code above this line + // Only change code above this line } checkPositive([1, 2, 3, -4, 5]); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md index 9b55ca9bbc..bfb642ffbb 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/add-methods-after-inheritance.english.md @@ -74,17 +74,14 @@ Animal.prototype.eat = function() { console.log("nom nom nom"); }; function Dog() { } -// Add your code below this line +// Only change code below this line -// Add your code above this line +// Only change code above this line let beagle = new Dog(); - -beagle.eat(); // Should print "nom nom nom" -beagle.bark(); // Should print "Woof!" ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.english.md index 04e53f6a2f..a296611a89 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/change-the-prototype-to-a-new-object.english.md @@ -75,7 +75,7 @@ function Dog(name) { } Dog.prototype = { - // Add your code below this line + // Only change code below this line }; ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.english.md index 099893a876..9554a33f7d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.english.md @@ -81,13 +81,10 @@ Animal.prototype = { } }; -// Add your code below this line +// Only change code below this line let duck; // Change this line let beagle; // Change this line - -duck.eat(); // Should print "nom nom nom" -beagle.eat(); // Should print "nom nom nom" ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.english.md index 016c618645..36755290c3 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.english.md @@ -77,7 +77,7 @@ let beagle = new Dog("Snoopy"); let ownProps = []; let prototypeProps = []; -// Add your code below this line +// Only change code below this line diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.english.md index 1d22e5efe2..cb14ddb6c2 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/override-inherited-methods.english.md @@ -82,11 +82,11 @@ function Penguin() { } Penguin.prototype = Object.create(Bird.prototype); Penguin.prototype.constructor = Penguin; -// Add your code below this line +// Only change code below this line -// Add your code above this line +// Only change code above this line let penguin = new Penguin(); console.log(penguin.fly()); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.english.md index 78b17a2be9..3c13320dcf 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.english.md @@ -62,7 +62,7 @@ function Dog() { } Bird.prototype = Object.create(Animal.prototype); Dog.prototype = Object.create(Animal.prototype); -// Add your code below this line +// Only change code below this line diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.english.md index 8742bab341..41da8f8ac4 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/set-the-childs-prototype-to-an-instance-of-the-parent.english.md @@ -58,11 +58,11 @@ Animal.prototype = { function Dog() { } -// Add your code below this line +// Only change code below this line let beagle = new Dog(); -beagle.eat(); // Should print "nom nom nom" + ```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.english.md index 45db91989a..ab1c8a2446 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.english.md @@ -71,7 +71,7 @@ function Bird(name) { let canary = new Bird("Tweety"); let ownProps = []; -// Add your code below this line +// Only change code below this line diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.english.md index 077b7bcf6d..28652884c8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-constructor-property.english.md @@ -64,7 +64,7 @@ function Dog(name) { this.name = name; } -// Add your code below this line +// Only change code below this line function joinDogFraternity(candidate) { } diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.english.md index 1137a9e0c0..da44752c9c 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-where-an-objects-prototype-comes-from.english.md @@ -55,7 +55,7 @@ function Dog(name) { let beagle = new Dog("Snoopy"); -// Add your code below this line +// Only change code below this line ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.english.md index ca0522ac3b..f3717bf661 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-constructor-to-create-objects.english.md @@ -68,7 +68,7 @@ function Dog() { this.color = "brown"; this.numLegs = 4; } -// Add your code below this line +// Only change code below this line ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.english.md index 0156dd8e96..093d24cd03 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-a-mixin-to-add-common-behavior-between-unrelated-objects.english.md @@ -82,7 +82,7 @@ let boat = { type: "race-boat" }; -// Add your code below this line +// Only change code below this line diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.english.md index ad4a8c1338..61f9c93fef 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object.english.md @@ -50,7 +50,7 @@ let dog = { name: "Spot", numLegs: 4 }; -// Add your code below this line +// Only change code below this line ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.english.md index 6c0eb351d7..3a158e252d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-prototype-properties-to-reduce-duplicate-code.english.md @@ -60,7 +60,7 @@ function Dog(name) { -// Add your code above this line +// Only change code above this line let beagle = new Dog("Snoopy"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.english.md index 6e3470d34d..4aea7e6904 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/object-oriented-programming/verify-an-objects-constructor-with-instanceof.english.md @@ -64,7 +64,7 @@ function House(numBedrooms) { this.numBedrooms = numBedrooms; } -// Add your code below this line +// Only change code below this line diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.english.md index 4035acd1e2..5d99506be8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/find-one-or-more-criminals-in-a-hunt.english.md @@ -64,13 +64,8 @@ tests:
```js -// example crowd gathering -let crowd = 'P1P2P3P4P5P6CCCP7P8P9'; - let reCriminals = /./; // Change this line -let matchedCriminals = crowd.match(reCriminals); -console.log(matchedCriminals); ```
@@ -83,13 +78,7 @@ console.log(matchedCriminals);
```js -// example crowd gathering -let crowd = 'P1P2P3P4P5P6CCCP7P8P9'; - let reCriminals = /C+/; // Change this line - -let matchedCriminals = crowd.match(reCriminals); - ```