diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md index 89c51dc5b0..c0f5f8a621 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md @@ -32,9 +32,9 @@ Create a variable called myData and set it to equal the first value ```yml tests: - text: The variable myData should equal the first value of myArray. - testString: assert((function(){if(typeof myArray !== 'undefined' && typeof myData !== 'undefined' && myArray[0] === myData){return true;}else{return false;}})(), 'The variable myData should equal the first value of myArray.'); + testString: assert((function(){if(typeof myArray !== 'undefined' && typeof myData !== 'undefined' && myArray[0] === myData){return true;}else{return false;}})()); - text: The data in variable myArray should be accessed using bracket notation. - testString: assert((function(){if(code.match(/\s*=\s*myArray\[0\]/g)){return true;}else{return false;}})(), 'The data in variable myArray should be accessed using bracket notation.'); + testString: assert((function(){if(code.match(/\s*=\s*myArray\[0\]/g)){return true;}else{return false;}})()); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.english.md index e160d20b9b..9662e1d248 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.english.md @@ -36,7 +36,7 @@ Using bracket notation select an element from myArray such that myData should be equal to 8. - testString: assert(myData === 8, 'myData should be equal to 8.'); + testString: assert(myData === 8); - text: You should be using bracket notation to read the correct value from myArray. testString: assert(/myData=myArray\[2\]\[1\]/.test(code.replace(/\s/g, ''))); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.english.md index 2ab107eb40..54222a8954 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.english.md @@ -46,9 +46,9 @@ Retrieve the second tree from the variable myPlants using object do ```yml tests: - text: secondTree should equal "pine" - testString: assert(secondTree === "pine", 'secondTree should equal "pine"'); + testString: assert(secondTree === "pine"); - text: Use dot and bracket notation to access myPlants - testString: assert(/=\s*myPlants\[1\].list\[1\]/.test(code), 'Use dot and bracket notation to access myPlants'); + testString: assert(/=\s*myPlants\[1\].list\[1\]/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.english.md index 16e20fa29f..1349327386 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-objects.english.md @@ -40,9 +40,9 @@ Access the myStorage object and assign the contents of the gl ```yml tests: - text: gloveBoxContents should equal "maps" - testString: assert(gloveBoxContents === "maps", 'gloveBoxContents should equal "maps"'); + testString: assert(gloveBoxContents === "maps"); - text: Use dot and bracket notation to access myStorage - testString: assert(/=\s*myStorage\.car\.inside\[\s*("|')glove box\1\s*\]/g.test(code), 'Use dot and bracket notation to access myStorage'); + testString: assert(/=\s*myStorage\.car\.inside\[\s*("|')glove box\1\s*\]/g.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.english.md index b8f33e3373..244d6cb0e6 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.english.md @@ -36,15 +36,15 @@ Read the values of the properties "an entree" and "the drink" ```yml tests: - text: entreeValue should be a string - testString: assert(typeof entreeValue === 'string' , 'entreeValue should be a string'); + testString: assert(typeof entreeValue === 'string' ); - text: The value of entreeValue should be "hamburger" - testString: assert(entreeValue === 'hamburger' , 'The value of entreeValue should be "hamburger"'); + testString: assert(entreeValue === 'hamburger' ); - text: drinkValue should be a string - testString: assert(typeof drinkValue === 'string' , 'drinkValue should be a string'); + testString: assert(typeof drinkValue === 'string' ); - text: The value of drinkValue should be "water" - testString: assert(drinkValue === 'water' , 'The value of drinkValue should be "water"'); + testString: assert(drinkValue === 'water' ); - text: You should use bracket notation twice - testString: assert(code.match(/testObj\s*?\[('|")[^'"]+\1\]/g).length > 1, 'You should use bracket notation twice'); + testString: assert(code.match(/testObj\s*?\[('|")[^'"]+\1\]/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.english.md index 5eaf0ebc6f..1359c0dec4 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.english.md @@ -33,15 +33,15 @@ Read in the property values of testObj using dot notation. Set the ```yml tests: - text: hatValue should be a string - testString: assert(typeof hatValue === 'string' , 'hatValue should be a string'); + testString: assert(typeof hatValue === 'string' ); - text: The value of hatValue should be "ballcap" - testString: assert(hatValue === 'ballcap' , 'The value of hatValue should be "ballcap"'); + testString: assert(hatValue === 'ballcap' ); - text: shirtValue should be a string - testString: assert(typeof shirtValue === 'string' , 'shirtValue should be a string'); + testString: assert(typeof shirtValue === 'string' ); - text: The value of shirtValue should be "jersey" - testString: assert(shirtValue === 'jersey' , 'The value of shirtValue should be "jersey"'); + testString: assert(shirtValue === 'jersey' ); - text: You should use dot notation twice - testString: assert(code.match(/testObj\.\w+/g).length > 1, 'You should use dot notation twice'); + testString: assert(code.match(/testObj\.\w+/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.english.md index 8bd792c636..bc1c409816 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.english.md @@ -47,17 +47,17 @@ Use the playerNumber variable to look up player 16 in ```yml tests: - text: playerNumber should be a number - testString: assert(typeof playerNumber === 'number', 'playerNumber should be a number'); + testString: assert(typeof playerNumber === 'number'); - text: The variable player should be a string - testString: assert(typeof player === 'string', 'The variable player should be a string'); + testString: assert(typeof player === 'string'); - text: The value of player should be "Montana" - testString: assert(player === 'Montana', 'The value of player should be "Montana"'); + testString: assert(player === 'Montana'); - text: You should use bracket notation to access testObj - testString: assert(/testObj\s*?\[.*?\]/.test(code),'You should use bracket notation to access testObj'); + testString: assert(/testObj\s*?\[.*?\]/.test(code)); - text: You should not assign the value Montana to the variable player directly. - testString: assert(!code.match(/player\s*=\s*"|\'\s*Montana\s*"|\'\s*;/gi),'You should not assign the value Montana to the variable player directly.'); + testString: assert(!code.match(/player\s*=\s*"|\'\s*Montana\s*"|\'\s*;/gi)); - text: You should be using the variable playerNumber in your bracket notation - testString: assert(/testObj\s*?\[\s*playerNumber\s*\]/.test(code),'You should be using the variable playerNumber in your bracket notation'); + testString: assert(/testObj\s*?\[\s*playerNumber\s*\]/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-new-properties-to-a-javascript-object.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-new-properties-to-a-javascript-object.english.md index b2dab32bba..fced7ac648 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-new-properties-to-a-javascript-object.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-new-properties-to-a-javascript-object.english.md @@ -26,9 +26,9 @@ Add a "bark" property to myDog and set it to a dog sou ```yml tests: - text: Add the property "bark" to myDog. - testString: assert(myDog.bark !== undefined, 'Add the property "bark" to myDog.'); + testString: assert(myDog.bark !== undefined); - text: Do not add "bark" to the setup section - testString: assert(!/bark[^\n]:/.test(code), 'Do not add "bark" to the setup section'); + testString: assert(!/bark[^\n]:/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md index a6f589fc86..955b39b0ec 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/add-two-numbers-with-javascript.english.md @@ -29,9 +29,9 @@ Change the 0 so that sum will equal 20. ```yml tests: - text: sum should equal 20 - testString: assert(sum === 20, 'sum should equal 20'); + testString: assert(sum === 20); - text: Use the + operator - testString: assert(/\+/.test(code), 'Use the + operator'); + testString: assert(/\+/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.english.md index 60337c0764..a1dcd6a3d8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/adding-a-default-option-in-switch-statements.english.md @@ -38,21 +38,21 @@ Write a switch statement to set answer for the following conditions ```yml tests: - text: switchOfStuff("a") should have a value of "apple" - testString: assert(switchOfStuff("a") === "apple", 'switchOfStuff("a") should have a value of "apple"'); + testString: assert(switchOfStuff("a") === "apple"); - text: switchOfStuff("b") should have a value of "bird" - testString: assert(switchOfStuff("b") === "bird", 'switchOfStuff("b") should have a value of "bird"'); + testString: assert(switchOfStuff("b") === "bird"); - text: switchOfStuff("c") should have a value of "cat" - testString: assert(switchOfStuff("c") === "cat", 'switchOfStuff("c") should have a value of "cat"'); + testString: assert(switchOfStuff("c") === "cat"); - text: switchOfStuff("d") should have a value of "stuff" - testString: assert(switchOfStuff("d") === "stuff", 'switchOfStuff("d") should have a value of "stuff"'); + testString: assert(switchOfStuff("d") === "stuff"); - text: switchOfStuff(4) should have a value of "stuff" - testString: assert(switchOfStuff(4) === "stuff", 'switchOfStuff(4) should have a value of "stuff"'); + testString: assert(switchOfStuff(4) === "stuff"); - text: You should not use any if or else statements - testString: assert(!/else/g.test(code) || !/if/g.test(code), 'You should not use any if or else statements'); + testString: assert(!/else/g.test(code) || !/if/g.test(code)); - text: You should use a default statement - testString: assert(switchOfStuff("string-to-trigger-default-case") === "stuff", 'You should use a default statement'); + testString: assert(switchOfStuff("string-to-trigger-default-case") === "stuff"); - text: You should have at least 3 break statements - testString: assert(code.match(/break/g).length > 2, 'You should have at least 3 break statements'); + testString: assert(code.match(/break/g).length > 2); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/appending-variables-to-strings.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/appending-variables-to-strings.english.md index 810cadff18..0a5feb47ae 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/appending-variables-to-strings.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/appending-variables-to-strings.english.md @@ -21,9 +21,9 @@ Set someAdjective and append it to myStr using the someAdjective should be set to a string at least 3 characters long - testString: assert(typeof someAdjective !== 'undefined' && someAdjective.length > 2, 'someAdjective should be set to a string at least 3 characters long'); + testString: assert(typeof someAdjective !== 'undefined' && someAdjective.length > 2); - text: Append someAdjective to myStr using the += operator - testString: assert(code.match(/myStr\s*\+=\s*someAdjective\s*/).length > 0, 'Append someAdjective to myStr using the += operator'); + testString: assert(code.match(/myStr\s*\+=\s*someAdjective\s*/).length > 0); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.english.md index bad5dede90..2c9bcf7cd7 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/assignment-with-a-returned-value.english.md @@ -24,9 +24,9 @@ Call the processArg function with an argument of 7 and ```yml tests: - text: processed should have a value of 2 - testString: assert(processed === 2, 'processed should have a value of 2'); + testString: assert(processed === 2); - text: You should assign processArg to processed - testString: assert(/processed\s*=\s*processArg\(\s*7\s*\)\s*;/.test(code), 'You should assign processArg to processed'); + testString: assert(/processed\s*=\s*processArg\(\s*7\s*\)\s*;/.test(code)); ``` 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 8c8187ab23..6207cd4291 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 @@ -46,15 +46,15 @@ You can set these object properties to whatever values you want, as long " ```yml tests: - text: myDog should contain the property name and it should be a string. - testString: assert((function(z){if(z.hasOwnProperty("name") && z.name !== undefined && typeof z.name === "string"){return true;}else{return false;}})(myDog), 'myDog should contain the property name and it should be a string.'); + testString: assert((function(z){if(z.hasOwnProperty("name") && z.name !== undefined && typeof z.name === "string"){return true;}else{return false;}})(myDog)); - text: myDog should contain the property legs and it should be a number. - testString: assert((function(z){if(z.hasOwnProperty("legs") && z.legs !== undefined && typeof z.legs === "number"){return true;}else{return false;}})(myDog), 'myDog should contain the property legs and it should be a number.'); + testString: assert((function(z){if(z.hasOwnProperty("legs") && z.legs !== undefined && typeof z.legs === "number"){return true;}else{return false;}})(myDog)); - text: myDog should contain the property tails and it should be a number. - testString: assert((function(z){if(z.hasOwnProperty("tails") && z.tails !== undefined && typeof z.tails === "number"){return true;}else{return false;}})(myDog), 'myDog should contain the property tails and it should be a number.'); + testString: assert((function(z){if(z.hasOwnProperty("tails") && z.tails !== undefined && typeof z.tails === "number"){return true;}else{return false;}})(myDog)); - text: myDog should contain the property friends and it should be an array. - testString: assert((function(z){if(z.hasOwnProperty("friends") && z.friends !== undefined && Array.isArray(z.friends)){return true;}else{return false;}})(myDog), 'myDog should contain the property friends and it should be an array.'); + testString: assert((function(z){if(z.hasOwnProperty("friends") && z.friends !== undefined && Array.isArray(z.friends)){return true;}else{return false;}})(myDog)); - text: myDog should only contain all the given properties. - testString: assert((function(z){return Object.keys(z).length === 4;})(myDog), 'myDog should only contain all the given properties.'); + testString: assert((function(z){return Object.keys(z).length === 4;})(myDog)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/chaining-if-else-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/chaining-if-else-statements.english.md index 185d043048..e296100656 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/chaining-if-else-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/chaining-if-else-statements.english.md @@ -36,31 +36,31 @@ Write chained if/else if statements to fulfill the fol ```yml tests: - text: You should have at least four else statements - testString: assert(code.match(/else/g).length > 3, 'You should have at least four else statements'); + testString: assert(code.match(/else/g).length > 3); - text: You should have at least four if statements - testString: assert(code.match(/if/g).length > 3, 'You should have at least four if statements'); + testString: assert(code.match(/if/g).length > 3); - text: You should have at least one return statement - testString: assert(code.match(/return/g).length >= 1, 'You should have at least one return statement'); + testString: assert(code.match(/return/g).length >= 1); - text: testSize(0) should return "Tiny" - testString: assert(testSize(0) === "Tiny", 'testSize(0) should return "Tiny"'); + testString: assert(testSize(0) === "Tiny"); - text: testSize(4) should return "Tiny" - testString: assert(testSize(4) === "Tiny", 'testSize(4) should return "Tiny"'); + testString: assert(testSize(4) === "Tiny"); - text: testSize(5) should return "Small" - testString: assert(testSize(5) === "Small", 'testSize(5) should return "Small"'); + testString: assert(testSize(5) === "Small"); - text: testSize(8) should return "Small" - testString: assert(testSize(8) === "Small", 'testSize(8) should return "Small"'); + testString: assert(testSize(8) === "Small"); - text: testSize(10) should return "Medium" - testString: assert(testSize(10) === "Medium", 'testSize(10) should return "Medium"'); + testString: assert(testSize(10) === "Medium"); - text: testSize(14) should return "Medium" - testString: assert(testSize(14) === "Medium", 'testSize(14) should return "Medium"'); + testString: assert(testSize(14) === "Medium"); - text: testSize(15) should return "Large" - testString: assert(testSize(15) === "Large", 'testSize(15) should return "Large"'); + testString: assert(testSize(15) === "Large"); - text: testSize(17) should return "Large" - testString: assert(testSize(17) === "Large", 'testSize(17) should return "Large"'); + testString: assert(testSize(17) === "Large"); - text: testSize(20) should return "Huge" - testString: assert(testSize(20) === "Huge", 'testSize(20) should return "Huge"'); + testString: assert(testSize(20) === "Huge"); - text: testSize(25) should return "Huge" - testString: assert(testSize(25) === "Huge", 'testSize(25) should return "Huge"'); + testString: assert(testSize(25) === "Huge"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.english.md index b1fe1f6305..6b175ae857 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.english.md @@ -36,9 +36,9 @@ Try creating one of each type of comment. ```yml tests: - text: Create a // style comment that contains at least five letters. - testString: assert(code.match(/(\/\/)...../g), 'Create a // style comment that contains at least five letters.'); + testString: assert(code.match(/(\/\/)...../g)); - text: Create a /* */ style comment that contains at least five letters. - testString: assert(code.match(/(\/\*)([^\/]{5,})(?=\*\/)/gm), 'Create a /* */ style comment that contains at least five letters.'); + testString: assert(code.match(/(\/\*)([^\/]{5,})(?=\*\/)/gm)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.english.md index 93eb8ff3b1..063bd243d3 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.english.md @@ -42,13 +42,13 @@ Add the equality operator to the indicated line so that the functio ```yml tests: - text: testEqual(10) should return "Not Equal" - testString: assert(testEqual(10) === "Not Equal", 'testEqual(10) should return "Not Equal"'); + testString: assert(testEqual(10) === "Not Equal"); - text: testEqual(12) should return "Equal" - testString: assert(testEqual(12) === "Equal", 'testEqual(12) should return "Equal"'); + testString: assert(testEqual(12) === "Equal"); - text: testEqual("12") should return "Equal" - testString: assert(testEqual("12") === "Equal", 'testEqual("12") should return "Equal"'); + testString: assert(testEqual("12") === "Equal"); - text: You should use the == operator - testString: assert(code.match(/==/g) && !code.match(/===/g), 'You should use the == operator'); + testString: assert(code.match(/==/g) && !code.match(/===/g)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.english.md index 62c855d30e..ed37640432 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-operator.english.md @@ -31,21 +31,21 @@ Add the greater than operator to the indicated lines so that the re ```yml tests: - text: testGreaterThan(0) should return "10 or Under" - testString: assert(testGreaterThan(0) === "10 or Under", 'testGreaterThan(0) should return "10 or Under"'); + testString: assert(testGreaterThan(0) === "10 or Under"); - text: testGreaterThan(10) should return "10 or Under" - testString: assert(testGreaterThan(10) === "10 or Under", 'testGreaterThan(10) should return "10 or Under"'); + testString: assert(testGreaterThan(10) === "10 or Under"); - text: testGreaterThan(11) should return "Over 10" - testString: assert(testGreaterThan(11) === "Over 10", 'testGreaterThan(11) should return "Over 10"'); + testString: assert(testGreaterThan(11) === "Over 10"); - text: testGreaterThan(99) should return "Over 10" - testString: assert(testGreaterThan(99) === "Over 10", 'testGreaterThan(99) should return "Over 10"'); + testString: assert(testGreaterThan(99) === "Over 10"); - text: testGreaterThan(100) should return "Over 10" - testString: assert(testGreaterThan(100) === "Over 10", 'testGreaterThan(100) should return "Over 10"'); + testString: assert(testGreaterThan(100) === "Over 10"); - text: testGreaterThan(101) should return "Over 100" - testString: assert(testGreaterThan(101) === "Over 100", 'testGreaterThan(101) should return "Over 100"'); + testString: assert(testGreaterThan(101) === "Over 100"); - text: testGreaterThan(150) should return "Over 100" - testString: assert(testGreaterThan(150) === "Over 100", 'testGreaterThan(150) should return "Over 100"'); + testString: assert(testGreaterThan(150) === "Over 100"); - text: You should use the > operator at least twice - testString: assert(code.match(/val\s*>\s*('|")*\d+('|")*/g).length > 1, 'You should use the > operator at least twice'); + testString: assert(code.match(/val\s*>\s*('|")*\d+('|")*/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.english.md index 8415457674..6617a53aa7 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-greater-than-or-equal-to-operator.english.md @@ -31,21 +31,21 @@ Add the greater than or equal to operator to the indicated lines so ```yml tests: - text: testGreaterOrEqual(0) should return "Less than 10" - testString: assert(testGreaterOrEqual(0) === "Less than 10", 'testGreaterOrEqual(0) should return "Less than 10"'); + testString: assert(testGreaterOrEqual(0) === "Less than 10"); - text: testGreaterOrEqual(9) should return "Less than 10" - testString: assert(testGreaterOrEqual(9) === "Less than 10", 'testGreaterOrEqual(9) should return "Less than 10"'); + testString: assert(testGreaterOrEqual(9) === "Less than 10"); - text: testGreaterOrEqual(10) should return "10 or Over" - testString: assert(testGreaterOrEqual(10) === "10 or Over", 'testGreaterOrEqual(10) should return "10 or Over"'); + testString: assert(testGreaterOrEqual(10) === "10 or Over"); - text: testGreaterOrEqual(11) should return "10 or Over" - testString: assert(testGreaterOrEqual(11) === "10 or Over", 'testGreaterOrEqual(11) should return "10 or Over"'); + testString: assert(testGreaterOrEqual(11) === "10 or Over"); - text: testGreaterOrEqual(19) should return "10 or Over" - testString: assert(testGreaterOrEqual(19) === "10 or Over", 'testGreaterOrEqual(19) should return "10 or Over"'); + testString: assert(testGreaterOrEqual(19) === "10 or Over"); - text: testGreaterOrEqual(100) should return "20 or Over" - testString: assert(testGreaterOrEqual(100) === "20 or Over", 'testGreaterOrEqual(100) should return "20 or Over"'); + testString: assert(testGreaterOrEqual(100) === "20 or Over"); - text: testGreaterOrEqual(21) should return "20 or Over" - testString: assert(testGreaterOrEqual(21) === "20 or Over", 'testGreaterOrEqual(21) should return "20 or Over"'); + testString: assert(testGreaterOrEqual(21) === "20 or Over"); - text: You should use the >= operator at least twice - testString: assert(code.match(/val\s*>=\s*('|")*\d+('|")*/g).length > 1, 'You should use the >= operator at least twice'); + testString: assert(code.match(/val\s*>=\s*('|")*\d+('|")*/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-inequality-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-inequality-operator.english.md index c6bf9b05aa..bfeba5803e 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-inequality-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-inequality-operator.english.md @@ -31,17 +31,17 @@ Add the inequality operator != in the if statement so ```yml tests: - text: testNotEqual(99) should return "Equal" - testString: assert(testNotEqual(99) === "Equal", 'testNotEqual(99) should return "Equal"'); + testString: assert(testNotEqual(99) === "Equal"); - text: testNotEqual("99") should return "Equal" - testString: assert(testNotEqual("99") === "Equal", 'testNotEqual("99") should return "Equal"'); + testString: assert(testNotEqual("99") === "Equal"); - text: testNotEqual(12) should return "Not Equal" - testString: assert(testNotEqual(12) === "Not Equal", 'testNotEqual(12) should return "Not Equal"'); + testString: assert(testNotEqual(12) === "Not Equal"); - text: testNotEqual("12") should return "Not Equal" - testString: assert(testNotEqual("12") === "Not Equal", 'testNotEqual("12") should return "Not Equal"'); + testString: assert(testNotEqual("12") === "Not Equal"); - text: testNotEqual("bob") should return "Not Equal" - testString: assert(testNotEqual("bob") === "Not Equal", 'testNotEqual("bob") should return "Not Equal"'); + testString: assert(testNotEqual("bob") === "Not Equal"); - text: You should use the != operator - testString: assert(code.match(/(?!!==)!=/), 'You should use the != operator'); + testString: assert(code.match(/(?!!==)!=/)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-operator.english.md index 5b756dd707..0a2d21c085 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-operator.english.md @@ -31,19 +31,19 @@ Add the less than operator to the indicated lines so that the retur ```yml tests: - text: testLessThan(0) should return "Under 25" - testString: assert(testLessThan(0) === "Under 25", 'testLessThan(0) should return "Under 25"'); + testString: assert(testLessThan(0) === "Under 25"); - text: testLessThan(24) should return "Under 25" - testString: assert(testLessThan(24) === "Under 25", 'testLessThan(24) should return "Under 25"'); + testString: assert(testLessThan(24) === "Under 25"); - text: testLessThan(25) should return "Under 55" - testString: assert(testLessThan(25) === "Under 55", 'testLessThan(25) should return "Under 55"'); + testString: assert(testLessThan(25) === "Under 55"); - text: testLessThan(54) should return "Under 55" - testString: assert(testLessThan(54) === "Under 55", 'testLessThan(54) should return "Under 55"'); + testString: assert(testLessThan(54) === "Under 55"); - text: testLessThan(55) should return "55 or Over" - testString: assert(testLessThan(55) === "55 or Over", 'testLessThan(55) should return "55 or Over"'); + testString: assert(testLessThan(55) === "55 or Over"); - text: testLessThan(99) should return "55 or Over" - testString: assert(testLessThan(99) === "55 or Over", 'testLessThan(99) should return "55 or Over"'); + testString: assert(testLessThan(99) === "55 or Over"); - text: You should use the < operator at least twice - testString: assert(code.match(/val\s*<\s*('|")*\d+('|")*/g).length > 1, 'You should use the < operator at least twice'); + testString: assert(code.match(/val\s*<\s*('|")*\d+('|")*/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-or-equal-to-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-or-equal-to-operator.english.md index 9cdae6ce82..1fb052145f 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-or-equal-to-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-less-than-or-equal-to-operator.english.md @@ -31,21 +31,21 @@ Add the less than or equal to operator to the indicated lines so th ```yml tests: - text: testLessOrEqual(0) should return "Smaller Than or Equal to 12" - testString: assert(testLessOrEqual(0) === "Smaller Than or Equal to 12", 'testLessOrEqual(0) should return "Smaller Than or Equal to 12"'); + testString: assert(testLessOrEqual(0) === "Smaller Than or Equal to 12"); - text: testLessOrEqual(11) should return "Smaller Than or Equal to 12" - testString: assert(testLessOrEqual(11) === "Smaller Than or Equal to 12", 'testLessOrEqual(11) should return "Smaller Than or Equal to 12"'); + testString: assert(testLessOrEqual(11) === "Smaller Than or Equal to 12"); - text: testLessOrEqual(12) should return "Smaller Than or Equal to 12" - testString: assert(testLessOrEqual(12) === "Smaller Than or Equal to 12", 'testLessOrEqual(12) should return "Smaller Than or Equal to 12"'); + testString: assert(testLessOrEqual(12) === "Smaller Than or Equal to 12"); - text: testLessOrEqual(23) should return "Smaller Than or Equal to 24" - testString: assert(testLessOrEqual(23) === "Smaller Than or Equal to 24", 'testLessOrEqual(23) should return "Smaller Than or Equal to 24"'); + testString: assert(testLessOrEqual(23) === "Smaller Than or Equal to 24"); - text: testLessOrEqual(24) should return "Smaller Than or Equal to 24" - testString: assert(testLessOrEqual(24) === "Smaller Than or Equal to 24", 'testLessOrEqual(24) should return "Smaller Than or Equal to 24"'); + testString: assert(testLessOrEqual(24) === "Smaller Than or Equal to 24"); - text: testLessOrEqual(25) should return "More Than 24" - testString: assert(testLessOrEqual(25) === "More Than 24", 'testLessOrEqual(25) should return "More Than 24"'); + testString: assert(testLessOrEqual(25) === "More Than 24"); - text: testLessOrEqual(55) should return "More Than 24" - testString: assert(testLessOrEqual(55) === "More Than 24", 'testLessOrEqual(55) should return "More Than 24"'); + testString: assert(testLessOrEqual(55) === "More Than 24"); - text: You should use the <= operator at least twice - testString: assert(code.match(/val\s*<=\s*('|")*\d+('|")*/g).length > 1, 'You should use the <= operator at least twice'); + testString: assert(code.match(/val\s*<=\s*('|")*\d+('|")*/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-equality-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-equality-operator.english.md index 1c53883e82..51f62a0047 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-equality-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-equality-operator.english.md @@ -30,13 +30,13 @@ Use the strict equality operator in the if statement so the functio ```yml tests: - text: testStrict(10) should return "Not Equal" - testString: assert(testStrict(10) === "Not Equal", 'testStrict(10) should return "Not Equal"'); + testString: assert(testStrict(10) === "Not Equal"); - text: testStrict(7) should return "Equal" - testString: assert(testStrict(7) === "Equal", 'testStrict(7) should return "Equal"'); + testString: assert(testStrict(7) === "Equal"); - text: testStrict("7") should return "Not Equal" - testString: assert(testStrict("7") === "Not Equal", 'testStrict("7") should return "Not Equal"'); + testString: assert(testStrict("7") === "Not Equal"); - text: You should use the === operator - testString: assert(code.match(/(val\s*===\s*\d+)|(\d+\s*===\s*val)/g).length > 0, 'You should use the === operator'); + testString: assert(code.match(/(val\s*===\s*\d+)|(\d+\s*===\s*val)/g).length > 0); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-inequality-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-inequality-operator.english.md index a328f16cd0..640409a720 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-inequality-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-strict-inequality-operator.english.md @@ -29,15 +29,15 @@ Add the strict inequality operator to the if statement ```yml tests: - text: testStrictNotEqual(17) should return "Equal" - testString: assert(testStrictNotEqual(17) === "Equal", 'testStrictNotEqual(17) should return "Equal"'); + testString: assert(testStrictNotEqual(17) === "Equal"); - text: testStrictNotEqual("17") should return "Not Equal" - testString: assert(testStrictNotEqual("17") === "Not Equal", 'testStrictNotEqual("17") should return "Not Equal"'); + testString: assert(testStrictNotEqual("17") === "Not Equal"); - text: testStrictNotEqual(12) should return "Not Equal" - testString: assert(testStrictNotEqual(12) === "Not Equal", 'testStrictNotEqual(12) should return "Not Equal"'); + testString: assert(testStrictNotEqual(12) === "Not Equal"); - text: testStrictNotEqual("bob") should return "Not Equal" - testString: assert(testStrictNotEqual("bob") === "Not Equal", 'testStrictNotEqual("bob") should return "Not Equal"'); + testString: assert(testStrictNotEqual("bob") === "Not Equal"); - text: You should use the !== operator - testString: assert(code.match(/(val\s*!==\s*\d+)|(\d+\s*!==\s*val)/g).length > 0, 'You should use the !== operator'); + testString: assert(code.match(/(val\s*!==\s*\d+)|(\d+\s*!==\s*val)/g).length > 0); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-and-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-and-operator.english.md index 2d80b9b1d0..ede870011a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-and-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-and-operator.english.md @@ -41,25 +41,25 @@ Combine the two if statements into one statement which will return "Yes"&& operator once - testString: assert(code.match(/&&/g).length === 1, 'You should use the && operator once'); + testString: assert(code.match(/&&/g).length === 1); - text: You should only have one if statement - testString: assert(code.match(/if/g).length === 1, 'You should only have one if statement'); + testString: assert(code.match(/if/g).length === 1); - text: testLogicalAnd(0) should return "No" - testString: assert(testLogicalAnd(0) === "No", 'testLogicalAnd(0) should return "No"'); + testString: assert(testLogicalAnd(0) === "No"); - text: testLogicalAnd(24) should return "No" - testString: assert(testLogicalAnd(24) === "No", 'testLogicalAnd(24) should return "No"'); + testString: assert(testLogicalAnd(24) === "No"); - text: testLogicalAnd(25) should return "Yes" - testString: assert(testLogicalAnd(25) === "Yes", 'testLogicalAnd(25) should return "Yes"'); + testString: assert(testLogicalAnd(25) === "Yes"); - text: testLogicalAnd(30) should return "Yes" - testString: assert(testLogicalAnd(30) === "Yes", 'testLogicalAnd(30) should return "Yes"'); + testString: assert(testLogicalAnd(30) === "Yes"); - text: testLogicalAnd(50) should return "Yes" - testString: assert(testLogicalAnd(50) === "Yes", 'testLogicalAnd(50) should return "Yes"'); + testString: assert(testLogicalAnd(50) === "Yes"); - text: testLogicalAnd(51) should return "No" - testString: assert(testLogicalAnd(51) === "No", 'testLogicalAnd(51) should return "No"'); + testString: assert(testLogicalAnd(51) === "No"); - text: testLogicalAnd(75) should return "No" - testString: assert(testLogicalAnd(75) === "No", 'testLogicalAnd(75) should return "No"'); + testString: assert(testLogicalAnd(75) === "No"); - text: testLogicalAnd(80) should return "No" - testString: assert(testLogicalAnd(80) === "No", 'testLogicalAnd(80) should return "No"'); + testString: assert(testLogicalAnd(80) === "No"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-or-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-or-operator.english.md index f20a097574..2bbb5839f3 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-or-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/comparisons-with-the-logical-or-operator.english.md @@ -43,25 +43,25 @@ Combine the two if statements into one statement which returns || operator once - testString: assert(code.match(/\|\|/g).length === 1, 'You should use the || operator once'); + testString: assert(code.match(/\|\|/g).length === 1); - text: You should only have one if statement - testString: assert(code.match(/if/g).length === 1, 'You should only have one if statement'); + testString: assert(code.match(/if/g).length === 1); - text: testLogicalOr(0) should return "Outside" - testString: assert(testLogicalOr(0) === "Outside", 'testLogicalOr(0) should return "Outside"'); + testString: assert(testLogicalOr(0) === "Outside"); - text: testLogicalOr(9) should return "Outside" - testString: assert(testLogicalOr(9) === "Outside", 'testLogicalOr(9) should return "Outside"'); + testString: assert(testLogicalOr(9) === "Outside"); - text: testLogicalOr(10) should return "Inside" - testString: assert(testLogicalOr(10) === "Inside", 'testLogicalOr(10) should return "Inside"'); + testString: assert(testLogicalOr(10) === "Inside"); - text: testLogicalOr(15) should return "Inside" - testString: assert(testLogicalOr(15) === "Inside", 'testLogicalOr(15) should return "Inside"'); + testString: assert(testLogicalOr(15) === "Inside"); - text: testLogicalOr(19) should return "Inside" - testString: assert(testLogicalOr(19) === "Inside", 'testLogicalOr(19) should return "Inside"'); + testString: assert(testLogicalOr(19) === "Inside"); - text: testLogicalOr(20) should return "Inside" - testString: assert(testLogicalOr(20) === "Inside", 'testLogicalOr(20) should return "Inside"'); + testString: assert(testLogicalOr(20) === "Inside"); - text: testLogicalOr(21) should return "Outside" - testString: assert(testLogicalOr(21) === "Outside", 'testLogicalOr(21) should return "Outside"'); + testString: assert(testLogicalOr(21) === "Outside"); - text: testLogicalOr(25) should return "Outside" - testString: assert(testLogicalOr(25) === "Outside", 'testLogicalOr(25) should return "Outside"'); + testString: assert(testLogicalOr(25) === "Outside"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-addition.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-addition.english.md index 556a108c39..631b922f90 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-addition.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-addition.english.md @@ -31,15 +31,15 @@ Convert the assignments for a, b, and c t ```yml tests: - text: a should equal 15 - testString: assert(a === 15, 'a should equal 15'); + testString: assert(a === 15); - text: b should equal 26 - testString: assert(b === 26, 'b should equal 26'); + testString: assert(b === 26); - text: c should equal 19 - testString: assert(c === 19, 'c should equal 19'); + testString: assert(c === 19); - text: You should use the += operator for each variable - testString: assert(code.match(/\+=/g).length === 3, 'You should use the += operator for each variable'); + testString: assert(code.match(/\+=/g).length === 3); - text: Do not modify the code above the line - testString: assert(/var a = 3;/.test(code) && /var b = 17;/.test(code) && /var c = 12;/.test(code), 'Do not modify the code above the line'); + testString: assert(/var a = 3;/.test(code) && /var b = 17;/.test(code) && /var c = 12;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.english.md index aa336eaa2c..a9fa50579b 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-division.english.md @@ -24,15 +24,15 @@ Convert the assignments for a, b, and c t ```yml tests: - text: a should equal 4 - testString: assert(a === 4, 'a should equal 4'); + testString: assert(a === 4); - text: b should equal 27 - testString: assert(b === 27, 'b should equal 27'); + testString: assert(b === 27); - text: c should equal 3 - testString: assert(c === 3, 'c should equal 3'); + testString: assert(c === 3); - text: You should use the /= operator for each variable - testString: assert(code.match(/\/=/g).length === 3, 'You should use the /= operator for each variable'); + testString: assert(code.match(/\/=/g).length === 3); - text: Do not modify the code above the line - testString: assert(/var a = 48;/.test(code) && /var b = 108;/.test(code) && /var c = 33;/.test(code), 'Do not modify the code above the line'); + testString: assert(/var a = 48;/.test(code) && /var b = 108;/.test(code) && /var c = 33;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.english.md index 44c5679e59..4bbe8ff7c9 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-multiplication.english.md @@ -24,15 +24,15 @@ Convert the assignments for a, b, and c t ```yml tests: - text: a should equal 25 - testString: assert(a === 25, 'a should equal 25'); + testString: assert(a === 25); - text: b should equal 36 - testString: assert(b === 36, 'b should equal 36'); + testString: assert(b === 36); - text: c should equal 46 - testString: assert(c === 46, 'c should equal 46'); + testString: assert(c === 46); - text: You should use the *= operator for each variable - testString: assert(code.match(/\*=/g).length === 3, 'You should use the *= operator for each variable'); + testString: assert(code.match(/\*=/g).length === 3); - text: Do not modify the code above the line - testString: assert(/var a = 5;/.test(code) && /var b = 12;/.test(code) && /var c = 4\.6;/.test(code), 'Do not modify the code above the line'); + testString: assert(/var a = 5;/.test(code) && /var b = 12;/.test(code) && /var c = 4\.6;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.english.md index dd5dd279e7..3c70b1ffab 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/compound-assignment-with-augmented-subtraction.english.md @@ -24,15 +24,15 @@ Convert the assignments for a, b, and c t ```yml tests: - text: a should equal 5 - testString: assert(a === 5, 'a should equal 5'); + testString: assert(a === 5); - text: b should equal -6 - testString: assert(b === -6, 'b should equal -6'); + testString: assert(b === -6); - text: c should equal 2 - testString: assert(c === 2, 'c should equal 2'); + testString: assert(c === 2); - text: You should use the -= operator for each variable - testString: assert(code.match(/-=/g).length === 3, 'You should use the -= operator for each variable'); + testString: assert(code.match(/-=/g).length === 3); - text: Do not modify the code above the line - testString: assert(/var a = 11;/.test(code) && /var b = 9;/.test(code) && /var c = 3;/.test(code), 'Do not modify the code above the line'); + testString: assert(/var a = 11;/.test(code) && /var b = 9;/.test(code) && /var c = 3;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-plus-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-plus-operator.english.md index 4740b213fc..20fd37aab8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-plus-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-plus-operator.english.md @@ -28,13 +28,13 @@ Build myStr from the strings "This is the start. " and ```yml tests: - text: myStr should have a value of This is the start. This is the end. - testString: assert(myStr === "This is the start. This is the end.", 'myStr should have a value of This is the start. This is the end.'); + testString: assert(myStr === "This is the start. This is the end."); - text: Use the + operator to build myStr - testString: assert(code.match(/(["']).*(["'])\s*\+\s*(["']).*(["'])/g).length > 1, 'Use the + operator to build myStr'); + testString: assert(code.match(/(["']).*(["'])\s*\+\s*(["']).*(["'])/g).length > 1); - text: myStr should be created using the var keyword. - testString: assert(/var\s+myStr/.test(code), 'myStr should be created using the var keyword.'); + testString: assert(/var\s+myStr/.test(code)); - text: Make sure to assign the result to the myStr variable. - testString: assert(/myStr\s*=/.test(code), 'Make sure to assign the result to the myStr variable.'); + testString: assert(/myStr\s*=/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-the-plus-equals-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-the-plus-equals-operator.english.md index a27c74d814..d62df6d7aa 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-the-plus-equals-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/concatenating-strings-with-the-plus-equals-operator.english.md @@ -22,9 +22,9 @@ Build myStr over several lines by concatenating these two strings: ```yml tests: - text: myStr should have a value of This is the first sentence. This is the second sentence. - testString: assert(myStr === "This is the first sentence. This is the second sentence.", 'myStr should have a value of This is the first sentence. This is the second sentence.'); + testString: assert(myStr === "This is the first sentence. This is the second sentence."); - text: Use the += operator to build myStr - testString: assert(code.match(/\w\s*\+=\s*["']/g).length > 1 && code.match(/\w\s*\=\s*["']/g).length > 1, 'Use the += operator to build myStr'); + testString: assert(code.match(/\w\s*\+=\s*["']/g).length > 1 && code.match(/\w\s*\=\s*["']/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/constructing-strings-with-variables.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/constructing-strings-with-variables.english.md index 7c351aa15e..5be294f79c 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/constructing-strings-with-variables.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/constructing-strings-with-variables.english.md @@ -21,9 +21,9 @@ Set myName to a string equal to your name and build myStrmyName should be set to a string at least 3 characters long - testString: assert(typeof myName !== 'undefined' && myName.length > 2, 'myName should be set to a string at least 3 characters long'); + testString: assert(typeof myName !== 'undefined' && myName.length > 2); - text: Use two + operators to build myStr with myName inside it - testString: assert(code.match(/["']\s*\+\s*myName\s*\+\s*["']/g).length > 0, 'Use two + operators to build myStr with myName inside it'); + testString: assert(code.match(/["']\s*\+\s*myName\s*\+\s*["']/g).length > 0); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.english.md index 1b057d7855..afcf57d497 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.english.md @@ -33,11 +33,11 @@ Push the odd numbers from 9 through 1 to myArray using a for< ```yml tests: - text: You should be using a for loop for this. - testString: assert(code.match(/for\s*\(/g).length > 1, 'You should be using a for loop for this.'); + testString: assert(code.match(/for\s*\(/g).length > 1); - text: You should be using the array method push. - testString: assert(code.match(/myArray.push/), 'You should be using the array method push.'); + testString: assert(code.match(/myArray.push/)); - text: myArray should equal [9,7,5,3,1]. - testString: assert.deepEqual(myArray, [9,7,5,3,1], 'myArray should equal [9,7,5,3,1].'); + testString: assert.deepEqual(myArray, [9,7,5,3,1]); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.english.md index bad4a2434d..33d5abd794 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/counting-cards.english.md @@ -26,19 +26,19 @@ You will write a card counting function. It will receive a card par ```yml tests: - text: Cards Sequence 2, 3, 4, 5, 6 should return 5 Bet - testString: assert((function(){ count = 0; cc(2);cc(3);cc(4);cc(5);var out = cc(6); if(out === "5 Bet") {return true;} return false; })(), 'Cards Sequence 2, 3, 4, 5, 6 should return 5 Bet'); + testString: assert((function(){ count = 0; cc(2);cc(3);cc(4);cc(5);var out = cc(6); if(out === "5 Bet") {return true;} return false; })()); - text: Cards Sequence 7, 8, 9 should return 0 Hold - testString: assert((function(){ count = 0; cc(7);cc(8);var out = cc(9); if(out === "0 Hold") {return true;} return false; })(), 'Cards Sequence 7, 8, 9 should return 0 Hold'); + testString: assert((function(){ count = 0; cc(7);cc(8);var out = cc(9); if(out === "0 Hold") {return true;} return false; })()); - text: Cards Sequence 10, J, Q, K, A should return -5 Hold - testString: assert((function(){ count = 0; cc(10);cc('J');cc('Q');cc('K');var out = cc('A'); if(out === "-5 Hold") {return true;} return false; })(), 'Cards Sequence 10, J, Q, K, A should return -5 Hold'); + testString: assert((function(){ count = 0; cc(10);cc('J');cc('Q');cc('K');var out = cc('A'); if(out === "-5 Hold") {return true;} return false; })()); - text: Cards Sequence 3, 7, Q, 8, A should return -1 Hold - testString: assert((function(){ count = 0; cc(3);cc(7);cc('Q');cc(8);var out = cc('A'); if(out === "-1 Hold") {return true;} return false; })(), 'Cards Sequence 3, 7, Q, 8, A should return -1 Hold'); + testString: assert((function(){ count = 0; cc(3);cc(7);cc('Q');cc(8);var out = cc('A'); if(out === "-1 Hold") {return true;} return false; })()); - text: Cards Sequence 2, J, 9, 2, 7 should return 1 Bet - testString: assert((function(){ count = 0; cc(2);cc('J');cc(9);cc(2);var out = cc(7); if(out === "1 Bet") {return true;} return false; })(), 'Cards Sequence 2, J, 9, 2, 7 should return 1 Bet'); + testString: assert((function(){ count = 0; cc(2);cc('J');cc(9);cc(2);var out = cc(7); if(out === "1 Bet") {return true;} return false; })()); - text: Cards Sequence 2, 2, 10 should return 1 Bet - testString: assert((function(){ count = 0; cc(2);cc(2);var out = cc(10); if(out === "1 Bet") {return true;} return false; })(), 'Cards Sequence 2, 2, 10 should return 1 Bet'); + testString: assert((function(){ count = 0; cc(2);cc(2);var out = cc(10); if(out === "1 Bet") {return true;} return false; })()); - text: Cards Sequence 3, 2, A, 10, K should return -1 Hold - testString: assert((function(){ count = 0; cc(3);cc(2);cc('A');cc(10);var out = cc('K'); if(out === "-1 Hold") {return true;} return false; })(), 'Cards Sequence 3, 2, A, 10, K should return -1 Hold'); + testString: assert((function(){ count = 0; cc(3);cc(2);cc('A');cc(10);var out = cc('K'); if(out === "-1 Hold") {return true;} return false; })()); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.english.md index 688b8cac27..b47b1c155e 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/create-decimal-numbers-with-javascript.english.md @@ -22,9 +22,9 @@ Create a variable myDecimal and give it a decimal value with a frac ```yml tests: - text: myDecimal should be a number. - testString: assert(typeof myDecimal === "number", 'myDecimal should be a number.'); + testString: assert(typeof myDecimal === "number"); - text: myDecimal should have a decimal point - testString: assert(myDecimal % 1 != 0, 'myDecimal should have a decimal point'); + testString: assert(myDecimal % 1 != 0); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.english.md index def2732913..41b2e2fb99 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.english.md @@ -33,7 +33,7 @@ Use the var keyword to create a variable called myName ```yml tests: - text: You should declare myName with the var keyword, ending with a semicolon - testString: assert(/var\s+myName\s*;/.test(code), 'You should declare myName with the var keyword, ending with a semicolon'); + testString: assert(/var\s+myName\s*;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.english.md index a9b12dc3b6..ebe6eace23 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.english.md @@ -23,9 +23,9 @@ Create two new string variables: myFirstName and myFirstName should be a string with at least one character in it. - testString: assert((function(){if(typeof myFirstName !== "undefined" && typeof myFirstName === "string" && myFirstName.length > 0){return true;}else{return false;}})(), 'myFirstName should be a string with at least one character in it.'); + testString: assert((function(){if(typeof myFirstName !== "undefined" && typeof myFirstName === "string" && myFirstName.length > 0){return true;}else{return false;}})()); - text: myLastName should be a string with at least one character in it. - testString: assert((function(){if(typeof myLastName !== "undefined" && typeof myLastName === "string" && myLastName.length > 0){return true;}else{return false;}})(), 'myLastName should be a string with at least one character in it.'); + testString: assert((function(){if(typeof myLastName !== "undefined" && typeof myLastName === "string" && myLastName.length > 0){return true;}else{return false;}})()); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.english.md index 12247942d4..6591b7181a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.english.md @@ -25,13 +25,13 @@ Change the code to use the -- operator on myVar. ```yml tests: - text: myVar should equal 10 - testString: assert(myVar === 10, 'myVar should equal 10'); + testString: assert(myVar === 10); - text: myVar = myVar - 1; should be changed - testString: assert(/var\s*myVar\s*=\s*11;\s*\/*.*\s*([-]{2}\s*myVar|myVar\s*[-]{2});/.test(code), 'myVar = myVar - 1; should be changed'); + testString: assert(/var\s*myVar\s*=\s*11;\s*\/*.*\s*([-]{2}\s*myVar|myVar\s*[-]{2});/.test(code)); - text: Use the -- operator on myVar - testString: assert(/[-]{2}\s*myVar|myVar\s*[-]{2}/.test(code), 'Use the -- operator on myVar'); + testString: assert(/[-]{2}\s*myVar|myVar\s*[-]{2}/.test(code)); - text: Do not change code above the line - testString: assert(/var myVar = 11;/.test(code), 'Do not change code above the line'); + testString: assert(/var myVar = 11;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.english.md index ce2cd2f0bf..60f885fd46 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.english.md @@ -22,9 +22,9 @@ Delete the "tails" property from myDog. You may use ei ```yml tests: - text: Delete the property "tails" from myDog. - testString: assert(typeof myDog === "object" && myDog.tails === undefined, 'Delete the property "tails" from myDog.'); + testString: assert(typeof myDog === "object" && myDog.tails === undefined); - text: Do not modify the myDog setup - testString: 'assert(code.match(/"tails": 1/g).length > 1, ''Do not modify the myDog setup'');' + testString: 'assert(code.match(/"tails": 1/g).length > 1);' ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-decimal-by-another-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-decimal-by-another-with-javascript.english.md index 3d03b0927d..e85ff19eef 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-decimal-by-another-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-decimal-by-another-with-javascript.english.md @@ -21,11 +21,11 @@ Change the 0.0 so that quotient will equal to 2. ```yml tests: - text: The variable quotient should equal 2.2 - testString: assert(quotient === 2.2, 'The variable quotient should equal 2.2'); + testString: assert(quotient === 2.2); - text: You should use the / operator to divide 4.4 by 2 - testString: assert(/4\.40*\s*\/\s*2\.*0*/.test(code), 'You should use the / operator to divide 4.4 by 2'); + testString: assert(/4\.40*\s*\/\s*2\.*0*/.test(code)); - text: The quotient variable should only be assigned once - testString: assert(code.match(/quotient/g).length === 1, 'The quotient variable should only be assigned once'); + testString: assert(code.match(/quotient/g).length === 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.english.md index d158b11299..d08d75e8d0 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/divide-one-number-by-another-with-javascript.english.md @@ -30,9 +30,9 @@ Change the 0 so that the quotient is equal to 2< ```yml tests: - text: Make the variable quotient equal to 2. - testString: assert(quotient === 2, 'Make the variable quotient equal to 2.'); + testString: assert(quotient === 2); - text: Use the / operator - testString: assert(/\d+\s*\/\s*\d+/.test(code), 'Use the / operator'); + testString: assert(/\d+\s*\/\s*\d+/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.english.md index 088e45a5d9..7f55d1fdcb 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.english.md @@ -26,9 +26,9 @@ Use backslashes to assign a string to the myStr variable ```yml tests: - text: You should use two double quotes (") and four escaped double quotes (\"). - testString: assert(code.match(/\\"/g).length === 4 && code.match(/[^\\]"/g).length === 2, 'You should use two double quotes (") and four escaped double quotes (\").'); + testString: assert(code.match(/\\"/g).length === 4 && code.match(/[^\\]"/g).length === 2); - text: 'Variable myStr should contain the string: I am a "double quoted" string inside "double quotes".' - testString: 'assert(myStr === "I am a \"double quoted\" string inside \"double quotes\".", ''Variable myStr should contain the string: I am a "double quoted" string inside "double quotes".'');' + testString: 'assert(myStr === "I am a \"double quoted\" string inside \"double quotes\".");' ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/finding-a-remainder-in-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/finding-a-remainder-in-javascript.english.md index ab247ec2c8..2f0e38994f 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/finding-a-remainder-in-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/finding-a-remainder-in-javascript.english.md @@ -26,11 +26,11 @@ Set remainder equal to the remainder of 11 divided by ```yml tests: - text: The variable remainder should be initialized - testString: assert(/var\s+?remainder/.test(code), 'The variable remainder should be initialized'); + testString: assert(/var\s+?remainder/.test(code)); - text: The value of remainder should be 2 - testString: assert(remainder === 2, 'The value of remainder should be 2'); + testString: assert(remainder === 2); - text: You should use the % operator - testString: assert(/\s+?remainder\s*?=\s*?.*%.*;/.test(code), 'You should use the % operator'); + testString: assert(/\s+?remainder\s*?=\s*?.*%.*;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-fractions-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-fractions-with-javascript.english.md index 1e3a48c21b..49bbb0f403 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-fractions-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-fractions-with-javascript.english.md @@ -23,11 +23,11 @@ Change randomFraction to return a random number instead of returnin ```yml tests: - text: randomFraction should return a random number. - testString: assert(typeof randomFraction() === "number", 'randomFraction should return a random number.'); + testString: assert(typeof randomFraction() === "number"); - text: The number returned by randomFraction should be a decimal. - testString: assert((randomFraction()+''). match(/\./g), 'The number returned by randomFraction should be a decimal.'); + testString: assert((randomFraction()+''). match(/\./g)); - text: You should be using Math.random to generate the random decimal number. - testString: assert(code.match(/Math\.random/g).length >= 0, 'You should be using Math.random to generate the random decimal number.'); + testString: assert(code.match(/Math\.random/g).length >= 0); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.english.md index eb275f2a50..0e515b3631 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-with-javascript.english.md @@ -26,13 +26,13 @@ Use this technique to generate and return a random whole number between 0< ```yml tests: - text: The result of randomWholeNum should be a whole number. - testString: assert(typeof randomWholeNum() === "number" && (function(){var r = randomWholeNum();return Math.floor(r) === r;})(), 'The result of randomWholeNum should be a whole number.'); + testString: assert(typeof randomWholeNum() === "number" && (function(){var r = randomWholeNum();return Math.floor(r) === r;})()); - text: You should be using Math.random to generate a random number. - testString: assert(code.match(/Math.random/g).length > 1, 'You should be using Math.random to generate a random number.'); + testString: assert(code.match(/Math.random/g).length > 1); - text: You should have multiplied the result of Math.random by 10 to make it a number that is between zero and nine. - testString: assert(code.match(/\s*?Math.random\s*?\(\s*?\)\s*?\*\s*?10[\D]\s*?/g) || code.match(/\s*?10\s*?\*\s*?Math.random\s*?\(\s*?\)\s*?/g), 'You should have multiplied the result of Math.random by 10 to make it a number that is between zero and nine.'); + testString: assert(code.match(/\s*?Math.random\s*?\(\s*?\)\s*?\*\s*?10[\D]\s*?/g) || code.match(/\s*?10\s*?\*\s*?Math.random\s*?\(\s*?\)\s*?/g)); - text: You should use Math.floor to remove the decimal part of the number. - testString: assert(code.match(/Math.floor/g).length > 1, 'You should use Math.floor to remove the decimal part of the number.'); + testString: assert(code.match(/Math.floor/g).length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.english.md index 9bffcc8dbb..4165009541 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/generate-random-whole-numbers-within-a-range.english.md @@ -24,13 +24,13 @@ Create a function called randomRange that takes a range myMin ```yml tests: - text: The lowest random number that can be generated by randomRange should be equal to your minimum number, myMin. - testString: assert(calcMin === 5, 'The lowest random number that can be generated by randomRange should be equal to your minimum number, myMin.'); + testString: assert(calcMin === 5); - text: The highest random number that can be generated by randomRange should be equal to your maximum number, myMax. - testString: assert(calcMax === 15, 'The highest random number that can be generated by randomRange should be equal to your maximum number, myMax.'); + testString: assert(calcMax === 15); - text: The random number generated by randomRange should be an integer, not a decimal. - testString: assert(randomRange(0,1) % 1 === 0 , 'The random number generated by randomRange should be an integer, not a decimal.'); + testString: assert(randomRange(0,1) % 1 === 0 ); - text: randomRange should use both myMax and myMin, and return a random number in your range. - testString: assert((function(){if(code.match(/myMax/g).length > 1 && code.match(/myMin/g).length > 2 && code.match(/Math.floor/g) && code.match(/Math.random/g)){return true;}else{return false;}})(), 'randomRange should use both myMax and myMin, and return a random number in your range.'); + testString: assert((function(){if(code.match(/myMax/g).length > 1 && code.match(/myMin/g).length > 2 && code.match(/Math.floor/g) && code.match(/Math.random/g)){return true;}else{return false;}})()); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.english.md index 3a7b368847..fbc5ba1296 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.english.md @@ -23,13 +23,13 @@ Inside function fun1, assign 5 to oopsGlobalmyGlobal should be defined - testString: assert(typeof myGlobal != "undefined", 'myGlobal should be defined'); + testString: assert(typeof myGlobal != "undefined"); - text: myGlobal should have a value of 10 - testString: assert(myGlobal === 10, 'myGlobal should have a value of 10'); + testString: assert(myGlobal === 10); - text: myGlobal should be declared using the var keyword - testString: assert(/var\s+myGlobal/.test(code), 'myGlobal should be declared using the var keyword'); + testString: assert(/var\s+myGlobal/.test(code)); - text: oopsGlobal should be a global variable and have a value of 5 - testString: assert(typeof oopsGlobal != "undefined" && oopsGlobal === 5, 'oopsGlobal should be a global variable and have a value of 5'); + testString: assert(typeof oopsGlobal != "undefined" && oopsGlobal === 5); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.english.md index 772ca86c42..48d35d150d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.english.md @@ -32,11 +32,11 @@ Add a local variable to myOutfit function to override the value of ```yml tests: - text: Do not change the value of the global outerWear - testString: assert(outerWear === "T-Shirt", 'Do not change the value of the global outerWear'); + testString: assert(outerWear === "T-Shirt"); - text: myOutfit should return "sweater" - testString: assert(myOutfit() === "sweater", 'myOutfit should return "sweater"'); + testString: assert(myOutfit() === "sweater"); - text: Do not change the return statement - testString: assert(/return outerWear/.test(code), 'Do not change the return statement'); + testString: assert(/return outerWear/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.english.md index 5c06d964b4..a8095e5585 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.english.md @@ -24,27 +24,27 @@ Your function will be passed par and strokes arguments ```yml tests: - text: golfScore(4, 1) should return "Hole-in-one!" - testString: assert(golfScore(4, 1) === "Hole-in-one!", 'golfScore(4, 1) should return "Hole-in-one!"'); + testString: assert(golfScore(4, 1) === "Hole-in-one!"); - text: golfScore(4, 2) should return "Eagle" - testString: assert(golfScore(4, 2) === "Eagle", 'golfScore(4, 2) should return "Eagle"'); + testString: assert(golfScore(4, 2) === "Eagle"); - text: golfScore(5, 2) should return "Eagle" - testString: assert(golfScore(5, 2) === "Eagle", 'golfScore(5, 2) should return "Eagle"'); + testString: assert(golfScore(5, 2) === "Eagle"); - text: golfScore(4, 3) should return "Birdie" - testString: assert(golfScore(4, 3) === "Birdie", 'golfScore(4, 3) should return "Birdie"'); + testString: assert(golfScore(4, 3) === "Birdie"); - text: golfScore(4, 4) should return "Par" - testString: assert(golfScore(4, 4) === "Par", 'golfScore(4, 4) should return "Par"'); + testString: assert(golfScore(4, 4) === "Par"); - text: golfScore(1, 1) should return "Hole-in-one!" - testString: assert(golfScore(1, 1) === "Hole-in-one!", 'golfScore(1, 1) should return "Hole-in-one!"'); + testString: assert(golfScore(1, 1) === "Hole-in-one!"); - text: golfScore(5, 5) should return "Par" - testString: assert(golfScore(5, 5) === "Par", 'golfScore(5, 5) should return "Par"'); + testString: assert(golfScore(5, 5) === "Par"); - text: golfScore(4, 5) should return "Bogey" - testString: assert(golfScore(4, 5) === "Bogey", 'golfScore(4, 5) should return "Bogey"'); + testString: assert(golfScore(4, 5) === "Bogey"); - text: golfScore(4, 6) should return "Double Bogey" - testString: assert(golfScore(4, 6) === "Double Bogey", 'golfScore(4, 6) should return "Double Bogey"'); + testString: assert(golfScore(4, 6) === "Double Bogey"); - text: golfScore(4, 7) should return "Go Home!" - testString: assert(golfScore(4, 7) === "Go Home!", 'golfScore(4, 7) should return "Go Home!"'); + testString: assert(golfScore(4, 7) === "Go Home!"); - text: golfScore(5, 9) should return "Go Home!" - testString: assert(golfScore(5, 9) === "Go Home!", 'golfScore(5, 9) should return "Go Home!"'); + testString: assert(golfScore(5, 9) === "Go Home!"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.english.md index 41d48fbc30..6a74e5d890 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.english.md @@ -26,13 +26,13 @@ Change the code to use the ++ operator on myVar. ```yml tests: - text: myVar should equal 88 - testString: assert(myVar === 88, 'myVar should equal 88'); + testString: assert(myVar === 88); - text: myVar = myVar + 1; should be changed - testString: assert(/var\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code), 'myVar = myVar + 1; should be changed'); + testString: assert(/var\s*myVar\s*=\s*87;\s*\/*.*\s*([+]{2}\s*myVar|myVar\s*[+]{2});/.test(code)); - text: Use the ++ operator - testString: assert(/[+]{2}\s*myVar|myVar\s*[+]{2}/.test(code), 'Use the ++ operator'); + testString: assert(/[+]{2}\s*myVar|myVar\s*[+]{2}/.test(code)); - text: Do not change code above the line - testString: assert(/var myVar = 87;/.test(code), 'Do not change code above the line'); + testString: assert(/var myVar = 87;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.english.md index d3a140d5da..952a4deee9 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.english.md @@ -23,7 +23,7 @@ Define a variable a with var and initialize it to a va ```yml tests: - text: Initialize a to a value of 9 - testString: assert(/var\s+a\s*=\s*9\s*/.test(code), 'Initialize a to a value of 9'); + testString: assert(/var\s+a\s*=\s*9\s*/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.english.md index 6150a5ae7b..625b650b0c 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.english.md @@ -32,21 +32,21 @@ Convert the logic to use else if statements. ```yml tests: - text: You should have at least two else statements - testString: assert(code.match(/else/g).length > 1, 'You should have at least two else statements'); + testString: assert(code.match(/else/g).length > 1); - text: You should have at least two if statements - testString: assert(code.match(/if/g).length > 1, 'You should have at least two if statements'); - - text: You should have closing and opening curly braces for each condition - testString: assert(code.match(/if\s*\((.+)\)\s*\{[\s\S]+\}\s*else if\s*\((.+)\)\s*\{[\s\S]+\}\s*else\s*\{[\s\S]+\s*\}/), 'You should have closing and opening curly braces for each condition in your if else statement'); + testString: assert(code.match(/if/g).length > 1); + - text: You should have closing and opening curly braces for each if else code block. + testString: assert(code.match(/if\s*\((.+)\)\s*\{[\s\S]+\}\s*else if\s*\((.+)\)\s*\{[\s\S]+\}\s*else\s*\{[\s\S]+\s*\}/)); - text: testElseIf(0) should return "Smaller than 5" - testString: assert(testElseIf(0) === "Smaller than 5", 'testElseIf(0) should return "Smaller than 5"'); + testString: assert(testElseIf(0) === "Smaller than 5"); - text: testElseIf(5) should return "Between 5 and 10" - testString: assert(testElseIf(5) === "Between 5 and 10", 'testElseIf(5) should return "Between 5 and 10"'); + testString: assert(testElseIf(5) === "Between 5 and 10"); - text: testElseIf(7) should return "Between 5 and 10" - testString: assert(testElseIf(7) === "Between 5 and 10", 'testElseIf(7) should return "Between 5 and 10"'); + testString: assert(testElseIf(7) === "Between 5 and 10"); - text: testElseIf(10) should return "Between 5 and 10" - testString: assert(testElseIf(10) === "Between 5 and 10", 'testElseIf(10) should return "Between 5 and 10"'); + testString: assert(testElseIf(10) === "Between 5 and 10"); - text: testElseIf(12) should return "Greater than 10" - testString: assert(testElseIf(12) === "Greater than 10", 'testElseIf(12) should return "Greater than 10"'); + testString: assert(testElseIf(12) === "Greater than 10"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.english.md index 1fcd20e10b..6f0a3ae77a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.english.md @@ -30,19 +30,19 @@ Combine the if statements into a single if/else statem ```yml tests: - text: You should only have one if statement in the editor - testString: assert(code.match(/if/g).length === 1, 'You should only have one if statement in the editor'); + testString: assert(code.match(/if/g).length === 1); - text: You should use an else statement - testString: assert(/else/g.test(code), 'You should use an else statement'); + testString: assert(/else/g.test(code)); - text: testElse(4) should return "5 or Smaller" - testString: assert(testElse(4) === "5 or Smaller", 'testElse(4) should return "5 or Smaller"'); + testString: assert(testElse(4) === "5 or Smaller"); - text: testElse(5) should return "5 or Smaller" - testString: assert(testElse(5) === "5 or Smaller", 'testElse(5) should return "5 or Smaller"'); + testString: assert(testElse(5) === "5 or Smaller"); - text: testElse(6) should return "Bigger than 5" - testString: assert(testElse(6) === "Bigger than 5", 'testElse(6) should return "Bigger than 5"'); + testString: assert(testElse(6) === "Bigger than 5"); - text: testElse(10) should return "Bigger than 5" - testString: assert(testElse(10) === "Bigger than 5", 'testElse(10) should return "Bigger than 5"'); + testString: assert(testElse(10) === "Bigger than 5"); - text: Do not change the code above or below the lines. - testString: assert(/var result = "";/.test(code) && /return result;/.test(code), 'Do not change the code above or below the lines.'); + testString: assert(/var result = "";/.test(code) && /return result;/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.english.md index bd55695fef..78ad5e67d7 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.english.md @@ -32,9 +32,9 @@ Push the odd numbers from 1 through 9 to myArray using a for< ```yml tests: - text: You should be using a for loop for this. - testString: assert(code.match(/for\s*\(/g).length > 1, 'You should be using a for loop for this.'); + testString: assert(code.match(/for\s*\(/g).length > 1); - text: myArray should equal [1,3,5,7,9]. - testString: assert.deepEqual(myArray, [1,3,5,7,9], 'myArray should equal [1,3,5,7,9].'); + testString: assert.deepEqual(myArray, [1,3,5,7,9]); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.english.md index ae05eeab89..0c0545f108 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.english.md @@ -58,11 +58,11 @@ Change the while loop in the code to a do...while loop ```yml tests: - text: You should be using a do...while loop for this exercise. - testString: assert(code.match(/do/g), 'You should be using a do...while loop for this exercise.'); + testString: assert(code.match(/do/g)); - text: myArray should equal [10]. - testString: assert.deepEqual(myArray, [10], 'myArray should equal [10].'); + testString: assert.deepEqual(myArray, [10]); - text: i should equal 11 - testString: assert.equal(i, 11, 'i should equal 11'); + testString: assert.equal(i, 11); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.english.md index ad65ec5dc8..951e14eb89 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.english.md @@ -37,9 +37,9 @@ Use a for loop to work to push the values 1 through 5 onto my ```yml tests: - text: You should be using a for loop for this. - testString: assert(code.match(/for\s*\(/g).length > 1, 'You should be using a for loop for this.'); + testString: assert(code.match(/for\s*\(/g).length > 1); - text: myArray should equal [1,2,3,4,5]. - testString: assert.deepEqual(myArray, [1,2,3,4,5], 'myArray should equal [1,2,3,4,5].'); + testString: assert.deepEqual(myArray, [1,2,3,4,5]); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.english.md index e285a04776..2fb2c22780 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.english.md @@ -33,9 +33,9 @@ Push the numbers 0 through 4 to myArray using a while ```yml tests: - text: You should be using a while loop for this. - testString: assert(code.match(/while/g), 'You should be using a while loop for this.'); + testString: assert(code.match(/while/g)); - text: myArray should equal [0,1,2,3,4]. - testString: assert.deepEqual(myArray, [0,1,2,3,4], 'myArray should equal [0,1,2,3,4].'); + testString: assert.deepEqual(myArray, [0,1,2,3,4]); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md index 17f687f7cf..88b3277f62 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.english.md @@ -34,9 +34,9 @@ Declare a local variable myVar inside myLocalScope. Ru ```yml tests: - text: No global myVar variable - testString: assert(typeof myVar === 'undefined', 'No global myVar variable'); + testString: assert(typeof myVar === 'undefined'); - text: Add a local myVar variable - testString: assert(/function\s+myLocalScope\s*\(\s*\)\s*\{\s[\s\S]+\s*var\s*myVar\s*(\s*|=[\s\S]+)\s*;[\s\S]+}/.test(code), 'Add a local myVar variable'); + testString: assert(/function\s+myLocalScope\s*\(\s*\)\s*\{\s[\s\S]+\s*var\s*myVar\s*(\s*|=[\s\S]+)\s*;[\s\S]+}/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.english.md index e03d664c09..1ee787d759 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.english.md @@ -58,11 +58,11 @@ Change the order of logic in the function so that it will return the correct sta ```yml tests: - text: orderMyLogic(4) should return "Less than 5" - testString: assert(orderMyLogic(4) === "Less than 5", 'orderMyLogic(4) should return "Less than 5"'); + testString: assert(orderMyLogic(4) === "Less than 5"); - text: orderMyLogic(6) should return "Less than 10" - testString: assert(orderMyLogic(6) === "Less than 10", 'orderMyLogic(6) should return "Less than 10"'); + testString: assert(orderMyLogic(6) === "Less than 10"); - text: orderMyLogic(11) should return "Greater than or equal to 10" - testString: assert(orderMyLogic(11) === "Greater than or equal to 10", 'orderMyLogic(11) should return "Greater than or equal to 10"'); + testString: assert(orderMyLogic(11) === "Greater than or equal to 10"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.english.md index 06d85c5d80..ad656f3212 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.english.md @@ -31,11 +31,11 @@ Use the .pop() function to remove the last item from myArray< ```yml tests: - text: myArray should only contain [["John", 23]]. - testString: assert((function(d){if(d[0][0] == 'John' && d[0][1] === 23 && d[1] == undefined){return true;}else{return false;}})(myArray), 'myArray should only contain [["John", 23]].'); + testString: assert((function(d){if(d[0][0] == 'John' && d[0][1] === 23 && d[1] == undefined){return true;}else{return false;}})(myArray)); - text: Use pop() on myArray - testString: assert(/removedFromMyArray\s*=\s*myArray\s*.\s*pop\s*(\s*)/.test(code), 'Use pop() on myArray'); + testString: assert(/removedFromMyArray\s*=\s*myArray\s*.\s*pop\s*(\s*)/.test(code)); - text: removedFromMyArray should only contain ["cat", 2]. - testString: assert((function(d){if(d[0] == 'cat' && d[1] === 2 && d[2] == undefined){return true;}else{return false;}})(removedFromMyArray), 'removedFromMyArray should only contain ["cat", 2].'); + testString: assert((function(d){if(d[0] == 'cat' && d[1] === 2 && d[2] == undefined){return true;}else{return false;}})(removedFromMyArray)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.english.md index 8bb294f1db..89c31d63a5 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.english.md @@ -29,7 +29,7 @@ Push ["dog", 3] onto the end of the myArray variable. ```yml tests: - text: myArray should now equal [["John", 23], ["cat", 2], ["dog", 3]]. - testString: assert((function(d){if(d[2] != undefined && d[0][0] == 'John' && d[0][1] === 23 && d[2][0] == 'dog' && d[2][1] === 3 && d[2].length == 2){return true;}else{return false;}})(myArray), 'myArray should now equal [["John", 23], ["cat", 2], ["dog", 3]].'); + testString: assert((function(d){if(d[2] != undefined && d[0][0] == 'John' && d[0][1] === 23 && d[2][0] == 'dog' && d[2][1] === 3 && d[2].length == 2){return true;}else{return false;}})(myArray)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.english.md index c735b5df5c..f4fc9490d0 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.english.md @@ -22,9 +22,9 @@ Use the .shift() function to remove the first item from myArr ```yml tests: - text: myArray should now equal [["dog", 3]]. - testString: assert((function(d){if(d[0][0] == 'dog' && d[0][1] === 3 && d[1] == undefined){return true;}else{return false;}})(myArray), 'myArray should now equal [["dog", 3]].'); + testString: assert((function(d){if(d[0][0] == 'dog' && d[0][1] === 3 && d[1] == undefined){return true;}else{return false;}})(myArray)); - text: removedFromMyArray should contain ["John", 23]. - testString: assert((function(d){if(d[0] == 'John' && d[1] === 23 && typeof removedFromMyArray === 'object'){return true;}else{return false;}})(removedFromMyArray), 'removedFromMyArray should contain ["John", 23].'); + testString: assert((function(d){if(d[0] == 'John' && d[1] === 23 && typeof removedFromMyArray === 'object'){return true;}else{return false;}})(removedFromMyArray)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.english.md index 5d354673d6..f588bffa32 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.english.md @@ -22,7 +22,7 @@ Add ["Paul",35] to the beginning of the myArray variab ```yml tests: - text: myArray should now have [["Paul", 35], ["dog", 3]]. - testString: assert((function(d){if(typeof d[0] === "object" && d[0][0] == 'Paul' && d[0][1] === 35 && d[1][0] != undefined && d[1][0] == 'dog' && d[1][1] != undefined && d[1][1] == 3){return true;}else{return false;}})(myArray), 'myArray should now have [["Paul", 35], ["dog", 3]].'); + testString: assert((function(d){if(typeof d[0] === "object" && d[0][0] == 'Paul' && d[0][1] === 35 && d[1][0] != undefined && d[1][0] == 'dog' && d[1][1] != undefined && d[1][1] == 3){return true;}else{return false;}})(myArray)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.english.md index 99bf0e53fb..a2f18fed84 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.english.md @@ -58,23 +58,23 @@ Add a new album to the myMusic array. Add artist and < ```yml tests: - text: myMusic should be an array - testString: assert(Array.isArray(myMusic), 'myMusic should be an array'); + testString: assert(Array.isArray(myMusic)); - text: myMusic should have at least two elements - testString: assert(myMusic.length > 1, 'myMusic should have at least two elements'); + testString: assert(myMusic.length > 1); - text: myMusic[1] should be an object - testString: assert(typeof myMusic[1] === 'object', 'myMusic[1] should be an object'); + testString: assert(typeof myMusic[1] === 'object'); - text: myMusic[1] should have at least 4 properties - testString: assert(Object.keys(myMusic[1]).length > 3, 'myMusic[1] should have at least 4 properties'); + testString: assert(Object.keys(myMusic[1]).length > 3); - text: myMusic[1] should contain an artist property which is a string - testString: assert(myMusic[1].hasOwnProperty('artist') && typeof myMusic[1].artist === 'string', 'myMusic[1] should contain an artist property which is a string'); + testString: assert(myMusic[1].hasOwnProperty('artist') && typeof myMusic[1].artist === 'string'); - text: myMusic[1] should contain a title property which is a string - testString: assert(myMusic[1].hasOwnProperty('title') && typeof myMusic[1].title === 'string', 'myMusic[1] should contain a title property which is a string'); + testString: assert(myMusic[1].hasOwnProperty('title') && typeof myMusic[1].title === 'string'); - text: myMusic[1] should contain a release_year property which is a number - testString: assert(myMusic[1].hasOwnProperty('release_year') && typeof myMusic[1].release_year === 'number', 'myMusic[1] should contain a release_year property which is a number'); + testString: assert(myMusic[1].hasOwnProperty('release_year') && typeof myMusic[1].release_year === 'number'); - text: myMusic[1] should contain a formats property which is an array - testString: assert(myMusic[1].hasOwnProperty('formats') && Array.isArray(myMusic[1].formats), 'myMusic[1] should contain a formats property which is an array'); + testString: assert(myMusic[1].hasOwnProperty('formats') && Array.isArray(myMusic[1].formats)); - text: formats should be an array of strings with at least two elements - testString: assert(myMusic[1].formats.every(function(item) { return (typeof item === "string")}) && myMusic[1].formats.length > 1, 'formats should be an array of strings with at least two elements'); + testString: assert(myMusic[1].formats.every(function(item) { return (typeof item === "string")}) && myMusic[1].formats.length > 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.english.md index 835e53a9ac..ff6769b17d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.english.md @@ -29,9 +29,9 @@ Modify the data stored at index 0 of myArray to a valu ```yml tests: - text: myArray should now be [45,64,99]. - testString: assert((function(){if(typeof myArray != 'undefined' && myArray[0] == 45 && myArray[1] == 64 && myArray[2] == 99){return true;}else{return false;}})(), 'myArray should now be [45,64,99].'); + testString: assert((function(){if(typeof myArray != 'undefined' && myArray[0] == 45 && myArray[1] == 64 && myArray[2] == 99){return true;}else{return false;}})()); - text: You should be using correct index to modify the value in myArray. - testString: assert((function(){if(code.match(/myArray\[0\]\s*=\s*/g)){return true;}else{return false;}})(), 'You should be using correct index to modify the value in myArray.'); + testString: assert((function(){if(code.match(/myArray\[0\]\s*=\s*/g)){return true;}else{return false;}})()); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.english.md index 602ec86c2f..3981a89b55 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.english.md @@ -36,27 +36,27 @@ Write a switch statement to set answer for the following ranges:
sequentialSizes(1)
should return "Low" - testString: assert(sequentialSizes(1) === "Low", 'sequentialSizes(1) should return "Low"'); + testString: assert(sequentialSizes(1) === "Low"); - text: sequentialSizes(2) should return "Low" - testString: assert(sequentialSizes(2) === "Low", 'sequentialSizes(2) should return "Low"'); + testString: assert(sequentialSizes(2) === "Low"); - text: sequentialSizes(3) should return "Low" - testString: assert(sequentialSizes(3) === "Low", 'sequentialSizes(3) should return "Low"'); + testString: assert(sequentialSizes(3) === "Low"); - text: sequentialSizes(4) should return "Mid" - testString: assert(sequentialSizes(4) === "Mid", 'sequentialSizes(4) should return "Mid"'); + testString: assert(sequentialSizes(4) === "Mid"); - text: sequentialSizes(5) should return "Mid" - testString: assert(sequentialSizes(5) === "Mid", 'sequentialSizes(5) should return "Mid"'); + testString: assert(sequentialSizes(5) === "Mid"); - text: sequentialSizes(6) should return "Mid" - testString: assert(sequentialSizes(6) === "Mid", 'sequentialSizes(6) should return "Mid"'); + testString: assert(sequentialSizes(6) === "Mid"); - text: sequentialSizes(7) should return "High" - testString: assert(sequentialSizes(7) === "High", 'sequentialSizes(7) should return "High"'); + testString: assert(sequentialSizes(7) === "High"); - text: sequentialSizes(8) should return "High" - testString: assert(sequentialSizes(8) === "High", 'sequentialSizes(8) should return "High"'); + testString: assert(sequentialSizes(8) === "High"); - text: sequentialSizes(9) should return "High" - testString: assert(sequentialSizes(9) === "High", 'sequentialSizes(9) should return "High"'); + testString: assert(sequentialSizes(9) === "High"); - text: You should not use any if or else statements - testString: assert(!/else/g.test(code) || !/if/g.test(code), 'You should not use any if or else statements'); + testString: assert(!/else/g.test(code) || !/if/g.test(code)); - text: You should have nine case statements - testString: assert(code.match(/case/g).length === 9, 'You should have nine case statements'); + testString: assert(code.match(/case/g).length === 9); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.english.md index d33d2da2df..f9ea1d8765 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.english.md @@ -22,9 +22,9 @@ Change the 0.0 so that product will equal 5.0. ```yml tests: - text: The variable product should equal 5.0. - testString: assert(product === 5.0, 'The variable product should equal 5.0.'); + testString: assert(product === 5.0); - text: You should use the * operator - testString: assert(/\*/.test(code), 'You should use the * operator'); + testString: assert(/\*/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-numbers-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-numbers-with-javascript.english.md index 9d9d253386..c0d15148e9 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-numbers-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-numbers-with-javascript.english.md @@ -30,9 +30,9 @@ Change the 0 so that product will equal 80. ```yml tests: - text: Make the variable product equal 80 - testString: assert(product === 80,'Make the variable product equal 80'); + testString: assert(product === 80); - text: Use the * operator - testString: assert(/\*/.test(code), 'Use the * operator'); + testString: assert(/\*/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.english.md index ca56dc9732..fcfea5e522 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.english.md @@ -21,7 +21,7 @@ Create a nested array called myArray. ```yml tests: - text: myArray should have at least one array nested within another array. - testString: assert(Array.isArray(myArray) && myArray.some(Array.isArray), 'myArray should have at least one array nested within another array.'); + testString: assert(Array.isArray(myArray) && myArray.some(Array.isArray)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.english.md index 3c6b7a06ee..a757b0f693 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.english.md @@ -34,11 +34,11 @@ Modify function multiplyAll so that it multiplies the product ```yml tests: - text: multiplyAll([[1],[2],[3]]) should return 6 - testString: assert(multiplyAll([[1],[2],[3]]) === 6, 'multiplyAll([[1],[2],[3]]) should return 6'); + testString: assert(multiplyAll([[1],[2],[3]]) === 6); - text: multiplyAll([[1,2],[3,4],[5,6,7]]) should return 5040 - testString: assert(multiplyAll([[1,2],[3,4],[5,6,7]]) === 5040, 'multiplyAll([[1,2],[3,4],[5,6,7]]) should return 5040'); + testString: assert(multiplyAll([[1,2],[3,4],[5,6,7]]) === 5040); - text: multiplyAll([[5,1],[0.2, 4, 0.5],[3, 9]]) should return 54 - testString: assert(multiplyAll([[5,1],[0.2, 4, 0.5],[3, 9]]) === 54, 'multiplyAll([[5,1],[0.2, 4, 0.5],[3, 9]]) should return 54'); + testString: assert(multiplyAll([[5,1],[0.2, 4, 0.5],[3, 9]]) === 54); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.english.md index 0421a4b31a..77d0371bc7 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.english.md @@ -32,13 +32,13 @@ We have passed two arguments, "Hello" and "World". Ins ```yml tests: - text: functionWithArgs should be a function - testString: assert(typeof functionWithArgs === 'function', 'functionWithArgs should be a function'); + testString: assert(typeof functionWithArgs === 'function'); - text: functionWithArgs(1,2) should output 3 - testString: if(typeof functionWithArgs === "function") { capture(); functionWithArgs(1,2); uncapture(); } assert(logOutput == 3, 'functionWithArgs(1,2) should output 3'); + testString: if(typeof functionWithArgs === "function") { capture(); functionWithArgs(1,2); uncapture(); } assert(logOutput == 3); - text: functionWithArgs(7,9) should output 16 - testString: if(typeof functionWithArgs === "function") { capture(); functionWithArgs(7,9); uncapture(); } assert(logOutput == 16, 'functionWithArgs(7,9) should output 16'); + testString: if(typeof functionWithArgs === "function") { capture(); functionWithArgs(7,9); uncapture(); } assert(logOutput == 16); - text: Call functionWithArgs with two numbers after you define it. - testString: assert(/^\s*functionWithArgs\s*\(\s*\d+\s*,\s*\d+\s*\)\s*;/m.test(code), 'Call functionWithArgs with two numbers after you define it.'); + testString: assert(/^\s*functionWithArgs\s*\(\s*\d+\s*,\s*\d+\s*\)\s*;/m.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.english.md index cf510b2a93..d9b732eebb 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.english.md @@ -36,11 +36,11 @@ The compareEquality function in the editor compares two values usin ```yml tests: - text: compareEquality(10, "10") should return "Not Equal" - testString: assert(compareEquality(10, "10") === "Not Equal", 'compareEquality(10, "10") should return "Not Equal"'); + testString: assert(compareEquality(10, "10") === "Not Equal"); - text: compareEquality("20", 20) should return "Not Equal" - testString: assert(compareEquality("20", 20) === "Not Equal", 'compareEquality("20", 20) should return "Not Equal"'); + testString: assert(compareEquality("20", 20) === "Not Equal"); - text: You should use the === operator - testString: assert(code.match(/===/g), 'You should use the === operator'); + testString: assert(code.match(/===/g)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.english.md index 91adf1afe9..2572028602 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.english.md @@ -28,15 +28,15 @@ tests: - text: "Kristian", "lastName" should return "Vos" testString: assert(lookUpProfile('Kristian','lastName') === "Vos", '"Kristian", "lastName" should return "Vos"'); - text: "Sherlock", "likes" should return ["Intriguing Cases", "Violin"] - testString: assert.deepEqual(lookUpProfile("Sherlock", "likes"), ["Intriguing Cases", "Violin"], '"Sherlock", "likes" should return ["Intriguing Cases", "Violin"]'); + testString: assert.deepEqual(lookUpProfile("Sherlock", "likes"), ["Intriguing Cases", "Violin"]); - text: "Harry","likes" should return an array - testString: assert(typeof lookUpProfile("Harry", "likes") === "object", '"Harry","likes" should return an array'); + testString: assert(typeof lookUpProfile("Harry", "likes") === "object"); - text: "Bob", "number" should return "No such contact" - testString: assert(lookUpProfile("Bob", "number") === "No such contact", '"Bob", "number" should return "No such contact"'); + testString: assert(lookUpProfile("Bob", "number") === "No such contact"); - text: "Bob", "potato" should return "No such contact" - testString: assert(lookUpProfile("Bob", "potato") === "No such contact", '"Bob", "potato" should return "No such contact"'); + testString: assert(lookUpProfile("Bob", "potato") === "No such contact"); - text: "Akira", "address" should return "No such property" - testString: assert(lookUpProfile("Akira", "address") === "No such property", '"Akira", "address" should return "No such property"'); + testString: assert(lookUpProfile("Akira", "address") === "No such property"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.english.md index d6fd345601..f4c2ab9cf1 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.english.md @@ -43,9 +43,9 @@ Right now, the <a> tag in the string uses double quotes eve ```yml tests: - text: Remove all the backslashes (\) - testString: assert(!/\\/g.test(code) && myStr.match('\\s*\\s*Link\\s*\\s*'), 'Remove all the backslashes (\)'); + testString: assert(!/\\/g.test(code) && myStr.match('\\s*\\s*Link\\s*\\s*')); - text: You should have two single quotes ' and four double quotes " - testString: assert(code.match(/"/g).length === 4 && code.match(/'/g).length === 2, 'You should have two single quotes ' and four double quotes "'); + testString: assert(code.match(/"/g).length === 4 && code.match(/'/g).length === 2); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.english.md index 27854fd2b3..a8fadf8753 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.english.md @@ -47,25 +47,25 @@ Change the chained if/else if statements into a ```yml tests: - text: You should not use any else statements anywhere in the editor - testString: assert(!/else/g.test(code), 'You should not use any else statements anywhere in the editor'); + testString: assert(!/else/g.test(code)); - text: You should not use any if statements anywhere in the editor - testString: assert(!/if/g.test(code), 'You should not use any if statements anywhere in the editor'); + testString: assert(!/if/g.test(code)); - text: You should have at least four break statements - testString: assert(code.match(/break/g).length >= 4, 'You should have at least four break statements'); + testString: assert(code.match(/break/g).length >= 4); - text: chainToSwitch("bob") should be "Marley" - testString: assert(chainToSwitch("bob") === "Marley", 'chainToSwitch("bob") should be "Marley"'); + testString: assert(chainToSwitch("bob") === "Marley"); - text: chainToSwitch(42) should be "The Answer" - testString: assert(chainToSwitch(42) === "The Answer", 'chainToSwitch(42) should be "The Answer"'); + testString: assert(chainToSwitch(42) === "The Answer"); - text: "chainToSwitch(1) should be \"There is no #1\"" - testString: "assert(chainToSwitch(1) === \"There is no #1\", 'chainToSwitch(1) should be \"There is no #1\"');" + testString: "assert(chainToSwitch(1) === \"There is no #1\");" - text: chainToSwitch(99) should be "Missed me by this much!" - testString: assert(chainToSwitch(99) === "Missed me by this much!", 'chainToSwitch(99) should be "Missed me by this much!"'); + testString: assert(chainToSwitch(99) === "Missed me by this much!"); - text: chainToSwitch(7) should be "Ate Nine" - testString: assert(chainToSwitch(7) === "Ate Nine", 'chainToSwitch(7) should be "Ate Nine"'); + testString: assert(chainToSwitch(7) === "Ate Nine"); - text: chainToSwitch("John") should be "" (empty string) - testString: assert(chainToSwitch("John") === "", 'chainToSwitch("John") should be "" (empty string)'); + testString: assert(chainToSwitch("John") === ""); - text: chainToSwitch(156) should be "" (empty string) - testString: assert(chainToSwitch(156) === "", 'chainToSwitch(156) should be "" (empty string)'); + testString: assert(chainToSwitch(156) === ""); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.english.md index 1605eca9ec..cecffe87d7 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.english.md @@ -31,13 +31,13 @@ Create a function timesFive that accepts one argument, multiplies i ```yml tests: - text: timesFive should be a function - testString: assert(typeof timesFive === 'function', 'timesFive should be a function'); + testString: assert(typeof timesFive === 'function'); - text: timesFive(5) should return 25 - testString: assert(timesFive(5) === 25, 'timesFive(5) should return 25'); + testString: assert(timesFive(5) === 25); - text: timesFive(2) should return 10 - testString: assert(timesFive(2) === 10, 'timesFive(2) should return 10'); + testString: assert(timesFive(2) === 10); - text: timesFive(0) should return 0 - testString: assert(timesFive(0) === 0, 'timesFive(0) should return 0'); + testString: assert(timesFive(0) === 0); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md index c2845684db..76602dc761 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.english.md @@ -34,17 +34,17 @@ Modify the function abTest so that if a or babTest(2,2) should return a number - testString: assert(typeof abTest(2,2) === 'number' , 'abTest(2,2) should return a number'); + testString: assert(typeof abTest(2,2) === 'number' ); - text: abTest(2,2) should return 8 - testString: assert(abTest(2,2) === 8 , 'abTest(2,2) should return 8'); + testString: assert(abTest(2,2) === 8 ); - text: abTest(-2,2) should return undefined - testString: assert(abTest(-2,2) === undefined , 'abTest(-2,2) should return undefined'); + testString: assert(abTest(-2,2) === undefined ); - text: abTest(2,-2) should return undefined - testString: assert(abTest(2,-2) === undefined , 'abTest(2,-2) should return undefined'); + testString: assert(abTest(2,-2) === undefined ); - text: abTest(2,8) should return 18 - testString: assert(abTest(2,8) === 18 , 'abTest(2,8) should return 18'); + testString: assert(abTest(2,8) === 18 ); - text: abTest(3,3) should return 12 - testString: assert(abTest(3,3) === 12 , 'abTest(3,3) should return 12'); + testString: assert(abTest(3,3) === 12 ); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.english.md index f78a087fce..7ba1e89f2d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.english.md @@ -41,11 +41,11 @@ Fix the function isLess to remove the if/else statemen ```yml tests: - text: isLess(10,15) should return true - testString: assert(isLess(10,15) === true, 'isLess(10,15) should return true'); + testString: assert(isLess(10,15) === true); - text: isLess(15,10) should return false - testString: assert(isLess(15, 10) === false, 'isLess(15,10) should return false'); + testString: assert(isLess(15, 10) === false); - text: You should not use any if or else statements - testString: assert(!/if|else/g.test(code), 'You should not use any if or else statements'); + testString: assert(!/if|else/g.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.english.md index 404ad258b8..2199b1f5ca 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.english.md @@ -39,17 +39,17 @@ Write a switch statement which tests val and sets answercaseInSwitch(1) should have a value of "alpha" - testString: assert(caseInSwitch(1) === "alpha", 'caseInSwitch(1) should have a value of "alpha"'); + testString: assert(caseInSwitch(1) === "alpha"); - text: caseInSwitch(2) should have a value of "beta" - testString: assert(caseInSwitch(2) === "beta", 'caseInSwitch(2) should have a value of "beta"'); + testString: assert(caseInSwitch(2) === "beta"); - text: caseInSwitch(3) should have a value of "gamma" - testString: assert(caseInSwitch(3) === "gamma", 'caseInSwitch(3) should have a value of "gamma"'); + testString: assert(caseInSwitch(3) === "gamma"); - text: caseInSwitch(4) should have a value of "delta" - testString: assert(caseInSwitch(4) === "delta", 'caseInSwitch(4) should have a value of "delta"'); + testString: assert(caseInSwitch(4) === "delta"); - text: You should not use any if or else statements - testString: assert(!/else/g.test(code) || !/if/g.test(code), 'You should not use any if or else statements'); + testString: assert(!/else/g.test(code) || !/if/g.test(code)); - text: You should have at least 3 break statements - testString: assert(code.match(/break/g).length > 2, 'You should have at least 3 break statements'); + testString: assert(code.match(/break/g).length > 2); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.english.md index 0c24041c70..ac7b988077 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.english.md @@ -24,13 +24,13 @@ There should be at least 5 sub-arrays in the list. ```yml tests: - text: myList should be an array - testString: assert(isArray, 'myList should be an array'); + testString: assert(isArray); - text: The first elements in each of your sub-arrays must all be strings - testString: assert(hasString, 'The first elements in each of your sub-arrays must all be strings'); + testString: assert(hasString); - text: The second elements in each of your sub-arrays must all be numbers - testString: assert(hasNumber, 'The second elements in each of your sub-arrays must all be numbers'); + testString: assert(hasNumber); - text: You must have at least 5 items in your list - testString: assert(count > 4, 'You must have at least 5 items in your list'); + testString: assert(count > 4); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.english.md index cc1c09215e..939749b619 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.english.md @@ -24,15 +24,15 @@ The nextInLine function should then return the element that was rem ```yml tests: - text: nextInLine([], 5) should return a number. - testString: assert.isNumber(nextInLine([],5), 'nextInLine([], 5) should return a number.'); + testString: assert.isNumber(nextInLine([],5)); - text: nextInLine([], 1) should return 1 - testString: assert(nextInLine([],1) === 1, 'nextInLine([], 1) should return 1'); + testString: assert(nextInLine([],1) === 1); - text: nextInLine([2], 1) should return 2 - testString: assert(nextInLine([2],1) === 2, 'nextInLine([2], 1) should return 2'); + testString: assert(nextInLine([2],1) === 2); - text: nextInLine([5,6,7,8,9], 1) should return 5 - testString: assert(nextInLine([5,6,7,8,9],1) === 5, 'nextInLine([5,6,7,8,9], 1) should return 5'); + testString: assert(nextInLine([5,6,7,8,9],1) === 5); - text: After nextInLine(testArr, 10), testArr[4] should be 10 - testString: nextInLine(testArr, 10); assert(testArr[4] === 10, 'After nextInLine(testArr, 10), testArr[4] should be 10'); + testString: nextInLine(testArr, 10); assert(testArr[4] === 10); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.english.md index 8f855c917a..91d766869a 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.english.md @@ -24,11 +24,11 @@ Modify the new array myArray so that it contains both a strin ```yml tests: - text: myArray should be an array. - testString: assert(typeof myArray == 'object', 'myArray should be an array.'); + testString: assert(typeof myArray == 'object'); - text: The first item in myArray should be a string. - testString: assert(typeof myArray[0] !== 'undefined' && typeof myArray[0] == 'string', 'The first item in myArray should be a string.'); + testString: assert(typeof myArray[0] !== 'undefined' && typeof myArray[0] == 'string'); - text: The second item in myArray should be a number. - testString: assert(typeof myArray[1] !== 'undefined' && typeof myArray[1] == 'number', 'The second item in myArray should be a number.'); + testString: assert(typeof myArray[1] !== 'undefined' && typeof myArray[1] == 'number'); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.english.md index 0c9034c540..ed8ed2f783 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.english.md @@ -32,13 +32,13 @@ Assign the contents of a to variable b. ```yml tests: - text: Do not change code above the line - testString: assert(/var a;/.test(code) && /var b = 2;/.test(code), 'Do not change code above the line'); + testString: assert(/var a;/.test(code) && /var b = 2;/.test(code)); - text: a should have a value of 7 - testString: assert(typeof a === 'number' && a === 7, 'a should have a value of 7'); + testString: assert(typeof a === 'number' && a === 7); - text: b should have a value of 7 - testString: assert(typeof b === 'number' && b === 7, 'b should have a value of 7'); + testString: assert(typeof b === 'number' && b === 7); - text: a should be assigned to b with = - testString: assert(/b\s*=\s*a\s*;/g.test(code), 'a should be assigned to b with ='); + testString: assert(/b\s*=\s*a\s*;/g.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.english.md index a06bbe5eae..407fda4299 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.english.md @@ -30,9 +30,9 @@ Change the 0 so the difference is 12. ```yml tests: - text: Make the variable difference equal 12. - testString: assert(difference === 12, 'Make the variable difference equal 12.'); + testString: assert(difference === 12); - text: Only subtract one number from 45. - testString: assert(/var\s*difference\s*=\s*45\s*-\s*[0-9]*;(?!\s*[a-zA-Z0-9]+)/.test(code),'Only subtract one number from 45.'); + testString: assert(/var\s*difference\s*=\s*45\s*-\s*[0-9]*;(?!\s*[a-zA-Z0-9]+)/.test(code)); ``` 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 898b21509d..09d203abd6 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 @@ -32,11 +32,11 @@ Modify the function checkObj to test myObj for c ```yml tests: - text: checkObj("gift") should return "pony". - testString: assert(checkObj("gift") === "pony", 'checkObj("gift") should return "pony".'); + testString: assert(checkObj("gift") === "pony"); - text: checkObj("pet") should return "kitten". - testString: assert(checkObj("pet") === "kitten", 'checkObj("pet") should return "kitten".'); + testString: assert(checkObj("pet") === "kitten"); - text: checkObj("house") should return "Not Found". - testString: assert(checkObj("house") === "Not Found", 'checkObj("house") should return "Not Found".'); + testString: assert(checkObj("house") === "Not Found"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.english.md index e2c8a61527..46935ce7a1 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.english.md @@ -35,9 +35,9 @@ Correct the assignment to myStr so it contains the string value of ```yml tests: - text: myStr should have a value of Hello World - testString: assert(myStr === "Hello World", 'myStr should have a value of Hello World'); + testString: assert(myStr === "Hello World"); - text: Do not change the code above the line - testString: assert(/myStr = "Jello World"/.test(code), 'Do not change the code above the line'); + testString: assert(/myStr = "Jello World"/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.english.md index d479c117f8..21bce31fe1 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.english.md @@ -22,9 +22,9 @@ Modify the welcomeToBooleans function so that it returns true ```yml tests: - text: The welcomeToBooleans() function should return a boolean (true/false) value. - testString: assert(typeof welcomeToBooleans() === 'boolean', 'The welcomeToBooleans() function should return a boolean (true/false) value.'); + testString: assert(typeof welcomeToBooleans() === 'boolean'); - text: welcomeToBooleans() should return true. - testString: assert(welcomeToBooleans() === true, 'welcomeToBooleans() should return true.'); + testString: assert(welcomeToBooleans() === true); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.english.md index 784e149630..dd1810a8ac 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.english.md @@ -32,17 +32,17 @@ Modify the existing declarations and assignments so their names use camelCa ```yml tests: - text: studlyCapVar is defined and has a value of 10 - testString: assert(typeof studlyCapVar !== 'undefined' && studlyCapVar === 10, 'studlyCapVar is defined and has a value of 10'); + testString: assert(typeof studlyCapVar !== 'undefined' && studlyCapVar === 10); - text: properCamelCase is defined and has a value of "A String" - testString: assert(typeof properCamelCase !== 'undefined' && properCamelCase === "A String", 'properCamelCase is defined and has a value of "A String"'); + testString: assert(typeof properCamelCase !== 'undefined' && properCamelCase === "A String"); - text: titleCaseOver is defined and has a value of 9000 - testString: assert(typeof titleCaseOver !== 'undefined' && titleCaseOver === 9000, 'titleCaseOver is defined and has a value of 9000'); + testString: assert(typeof titleCaseOver !== 'undefined' && titleCaseOver === 9000); - text: studlyCapVar should use camelCase in both declaration and assignment sections. - testString: assert(code.match(/studlyCapVar/g).length === 2, 'studlyCapVar should use camelCase in both declaration and assignment sections.'); + testString: assert(code.match(/studlyCapVar/g).length === 2); - text: properCamelCase should use camelCase in both declaration and assignment sections. - testString: assert(code.match(/properCamelCase/g).length === 2, 'properCamelCase should use camelCase in both declaration and assignment sections.'); + testString: assert(code.match(/properCamelCase/g).length === 2); - text: titleCaseOver should use camelCase in both declaration and assignment sections. - testString: assert(code.match(/titleCaseOver/g).length === 2, 'titleCaseOver should use camelCase in both declaration and assignment sections.'); + testString: assert(code.match(/titleCaseOver/g).length === 2); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.english.md index 64f75ddb6e..0ce4f0665b 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.english.md @@ -32,13 +32,13 @@ Create a function addFive without any arguments. This function adds ```yml tests: - text: addFive should be a function - testString: assert(typeof addFive === 'function', 'addFive should be a function'); + testString: assert(typeof addFive === 'function'); - text: sum should be equal to 8 - testString: assert(sum === 8, 'sum should be equal to 8'); + testString: assert(sum === 8); - text: Returned value from addFive should be undefined - testString: assert(addFive() === undefined, 'Returned value from addFive should be undefined'); + testString: assert(addFive() === undefined); - text: Inside of your functions, add 5 to the sum variable - testString: assert(code.match(/(sum\s*\=\s*sum\s*\+\s*5)|(sum\s*\+\=\s*5)/g).length === 1, 'Inside of your functions, add 5 to the sum variable'); + testString: assert(code.match(/(sum\s*\=\s*sum\s*\+\s*5)|(sum\s*\+\=\s*5)/g).length === 1); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.english.md index de2eafeb29..9f7cf454f8 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.english.md @@ -21,13 +21,13 @@ Initialize the three variables a, b, and ca should be defined and evaluated to have the value of 6 - testString: assert(typeof a === 'number' && a === 6, 'a should be defined and evaluated to have the value of 6'); + testString: assert(typeof a === 'number' && a === 6); - text: b should be defined and evaluated to have the value of 15 - testString: assert(typeof b === 'number' && b === 15, 'b should be defined and evaluated to have the value of 15'); + testString: assert(typeof b === 'number' && b === 15); - text: c should not contain undefined and should have a value of "I am a String!" - testString: assert(!/undefined/.test(c) && c === "I am a String!", 'c should not contain undefined and should have a value of "I am a String!"'); + testString: assert(!/undefined/.test(c) && c === "I am a String!"); - text: Do not change code below the line - testString: assert(/a = a \+ 1;/.test(code) && /b = b \+ 5;/.test(code) && /c = c \+ " String!";/.test(code), 'Do not change code below the line'); + testString: assert(/a = a \+ 1;/.test(code) && /b = b \+ 5;/.test(code) && /c = c \+ " String!";/.test(code)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.english.md index 29cf102fde..9908fc5a41 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.english.md @@ -36,9 +36,9 @@ Update the myDog object's name property. Let's change her name from ```yml tests: - text: Update myDog's "name" property to equal "Happy Coder". - testString: assert(/happy coder/gi.test(myDog.name), 'Update myDog's "name" property to equal "Happy Coder".'); + testString: assert(/happy coder/gi.test(myDog.name)); - text: Do not edit the myDog definition - testString: 'assert(/"name": "Coder"/.test(code), ''Do not edit the myDog definition'');' + testString: 'assert(/"name": "Coder"/.test(code));' ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.english.md index 249a4a3925..8b9ec574e2 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.english.md @@ -24,9 +24,9 @@ Use bracket notation to find the first character in the lastNam ```yml tests: - text: The firstLetterOfLastName variable should have the value of L. - testString: assert(firstLetterOfLastName === 'L', 'The firstLetterOfLastName variable should have the value of L.'); + testString: assert(firstLetterOfLastName === 'L'); - text: You should use bracket notation. - testString: assert(code.match(/firstLetterOfLastName\s*?=\s*?lastName\[.*?\]/), 'You should use bracket notation.'); + testString: assert(code.match(/firstLetterOfLastName\s*?=\s*?lastName\[.*?\]/)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.english.md index f47339a980..af1e6ab9e4 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.english.md @@ -23,9 +23,9 @@ Use bracket notation to find the last character in the lastName ```yml tests: - text: lastLetterOfLastName should be "e". - testString: assert(lastLetterOfLastName === "e", 'lastLetterOfLastName should be "e".'); + testString: assert(lastLetterOfLastName === "e"); - text: You have to use .length to get the last letter. - testString: assert(code.match(/\.length/g).length === 2, 'You have to use .length to get the last letter.'); + testString: assert(code.match(/\.length/g).length === 2); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.english.md index 0ecacb479e..d7292d29f4 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.english.md @@ -23,9 +23,9 @@ Let's try to set thirdLetterOfLastName to equal the third letter of ```yml tests: - text: The thirdLetterOfLastName variable should have the value of v. - testString: assert(thirdLetterOfLastName === 'v', 'The thirdLetterOfLastName variable should have the value of v.'); + testString: assert(thirdLetterOfLastName === 'v'); - text: You should use bracket notation. - testString: assert(code.match(/thirdLetterOfLastName\s*?=\s*?lastName\[.*?\]/), 'You should use bracket notation.'); + testString: assert(code.match(/thirdLetterOfLastName\s*?=\s*?lastName\[.*?\]/)); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.english.md index c4c21c173f..f9490eb309 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.english.md @@ -23,9 +23,9 @@ Use bracket notation to find the second-to-last character in the secondToLastLetterOfLastName should be "c". - testString: assert(secondToLastLetterOfLastName === 'c', 'secondToLastLetterOfLastName should be "c".'); + testString: assert(secondToLastLetterOfLastName === 'c'); - text: You have to use .length to get the second last letter. - testString: assert(code.match(/\.length/g).length === 2, 'You have to use .length to get the second last letter.'); + testString: assert(code.match(/\.length/g).length === 2); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.english.md index f6ad025088..582f1bee98 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.english.md @@ -38,15 +38,15 @@ Create an if statement inside the function to return "Yes, th ```yml tests: - text: trueOrFalse should be a function - testString: assert(typeof trueOrFalse === "function", 'trueOrFalse should be a function'); + testString: assert(typeof trueOrFalse === "function"); - text: trueOrFalse(true) should return a string - testString: assert(typeof trueOrFalse(true) === "string", 'trueOrFalse(true) should return a string'); + testString: assert(typeof trueOrFalse(true) === "string"); - text: trueOrFalse(false) should return a string - testString: assert(typeof trueOrFalse(false) === "string", 'trueOrFalse(false) should return a string'); + testString: assert(typeof trueOrFalse(false) === "string"); - text: trueOrFalse(true) should return "Yes, that was true" - testString: assert(trueOrFalse(true) === "Yes, that was true", 'trueOrFalse(true) should return "Yes, that was true"'); + testString: assert(trueOrFalse(true) === "Yes, that was true"); - text: trueOrFalse(false) should return "No, that was false" - testString: assert(trueOrFalse(false) === "No, that was false", 'trueOrFalse(false) should return "No, that was false"'); + testString: assert(trueOrFalse(false) === "No, that was false"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.english.md index df7fb63705..4ce46dff91 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.english.md @@ -55,13 +55,13 @@ Use multiple conditional operators in the checkSign fu ```yml tests: - text: checkSign should use multiple conditional operators - testString: assert(/.+?\s*?\?\s*?.+?\s*?:\s*?.+?\s*?\?\s*?.+?\s*?:\s*?.+?/gi.test(code), 'checkSign should use multiple conditional operators'); + testString: assert(/.+?\s*?\?\s*?.+?\s*?:\s*?.+?\s*?\?\s*?.+?\s*?:\s*?.+?/gi.test(code)); - text: checkSign(10) should return "positive". Note that capitalization matters - testString: assert(checkSign(10) === 'positive', 'checkSign(10) should return "positive". Note that capitalization matters'); + testString: assert(checkSign(10) === 'positive'); - text: checkSign(-12) should return "negative". Note that capitalization matters - testString: assert(checkSign(-12) === 'negative', 'checkSign(-12) should return "negative". Note that capitalization matters'); + testString: assert(checkSign(-12) === 'negative'); - text: checkSign(0) should return "zero". Note that capitalization matters - testString: assert(checkSign(0) === 'zero', 'checkSign(0) should return "zero". Note that capitalization matters'); + testString: assert(checkSign(0) === 'zero'); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.english.md index 765801da45..b08540bee2 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.english.md @@ -44,13 +44,13 @@ Use the conditional operator in the checkEqual functio ```yml tests: - text: checkEqual should use the conditional operator - testString: assert(/.+?\s*?\?\s*?.+?\s*?:\s*?.+?/.test(code), 'checkEqual should use the conditional operator'); + testString: assert(/.+?\s*?\?\s*?.+?\s*?:\s*?.+?/.test(code)); - text: checkEqual(1, 2) should return "Not Equal" - testString: assert(checkEqual(1, 2) === "Not Equal", 'checkEqual(1, 2) should return "Not Equal"'); + testString: assert(checkEqual(1, 2) === "Not Equal"); - text: checkEqual(1, 1) should return "Equal" - testString: assert(checkEqual(1, 1) === "Equal", 'checkEqual(1, 1) should return "Equal"'); + testString: assert(checkEqual(1, 1) === "Equal"); - text: checkEqual(1, -1) should return "Not Equal" - testString: assert(checkEqual(1, -1) === "Not Equal", 'checkEqual(1, -1) should return "Not Equal"'); + testString: assert(checkEqual(1, -1) === "Not Equal"); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.english.md index 6ae0dc7db6..3b092877cb 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.english.md @@ -26,15 +26,15 @@ Use parseInt() in the convertToInteger function so it ```yml tests: - text: convertToInteger should use the parseInt() function - testString: assert(/parseInt/g.test(code), 'convertToInteger should use the parseInt() function'); + testString: assert(/parseInt/g.test(code)); - text: convertToInteger("10011") should return a number - testString: assert(typeof(convertToInteger("10011")) === "number", 'convertToInteger("10011") should return a number'); + testString: assert(typeof(convertToInteger("10011")) === "number"); - text: convertToInteger("10011") should return 19 - testString: assert(convertToInteger("10011") === 19, 'convertToInteger("10011") should return 19'); + testString: assert(convertToInteger("10011") === 19); - text: convertToInteger("111001") should return 57 - testString: assert(convertToInteger("111001") === 57, 'convertToInteger("111001") should return 57'); + testString: assert(convertToInteger("111001") === 57); - text: convertToInteger("JamesBond") should return NaN - testString: assert.isNaN(convertToInteger("JamesBond"), 'convertToInteger("JamesBond") should return NaN'); + testString: assert.isNaN(convertToInteger("JamesBond")); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.english.md index 367d951579..86e0f0ada0 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.english.md @@ -23,15 +23,15 @@ Use parseInt() in the convertToInteger function so it ```yml tests: - text: convertToInteger should use the parseInt() function - testString: assert(/parseInt/g.test(code), 'convertToInteger should use the parseInt() function'); + testString: assert(/parseInt/g.test(code)); - text: convertToInteger("56") should return a number - testString: assert(typeof(convertToInteger("56")) === "number", 'convertToInteger("56") should return a number'); + testString: assert(typeof(convertToInteger("56")) === "number"); - text: convertToInteger("56") should return 56 - testString: assert(convertToInteger("56") === 56, 'convertToInteger("56") should return 56'); + testString: assert(convertToInteger("56") === 56); - text: convertToInteger("77") should return 77 - testString: assert(convertToInteger("77") === 77, 'convertToInteger("77") should return 77'); + testString: assert(convertToInteger("77") === 77); - text: convertToInteger("JamesBond") should return NaN - testString: assert.isNaN(convertToInteger("JamesBond"), 'convertToInteger("JamesBond") should return NaN'); + testString: assert.isNaN(convertToInteger("JamesBond")); ``` diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.english.md index 11894b0749..eba5bc2f24 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.english.md @@ -41,21 +41,21 @@ Convert the switch statement into an object called lookup. Use it t ```yml tests: - text: phoneticLookup("alpha") should equal "Adams" - testString: assert(phoneticLookup("alpha") === 'Adams', 'phoneticLookup("alpha") should equal "Adams"'); + testString: assert(phoneticLookup("alpha") === 'Adams'); - text: phoneticLookup("bravo") should equal "Boston" - testString: assert(phoneticLookup("bravo") === 'Boston', 'phoneticLookup("bravo") should equal "Boston"'); + testString: assert(phoneticLookup("bravo") === 'Boston'); - text: phoneticLookup("charlie") should equal "Chicago" - testString: assert(phoneticLookup("charlie") === 'Chicago', 'phoneticLookup("charlie") should equal "Chicago"'); + testString: assert(phoneticLookup("charlie") === 'Chicago'); - text: phoneticLookup("delta") should equal "Denver" - testString: assert(phoneticLookup("delta") === 'Denver', 'phoneticLookup("delta") should equal "Denver"'); + testString: assert(phoneticLookup("delta") === 'Denver'); - text: phoneticLookup("echo") should equal "Easy" - testString: assert(phoneticLookup("echo") === 'Easy', 'phoneticLookup("echo") should equal "Easy"'); + testString: assert(phoneticLookup("echo") === 'Easy'); - text: phoneticLookup("foxtrot") should equal "Frank" - testString: assert(phoneticLookup("foxtrot") === 'Frank', 'phoneticLookup("foxtrot") should equal "Frank"'); + testString: assert(phoneticLookup("foxtrot") === 'Frank'); - text: phoneticLookup("") should equal undefined - testString: assert(typeof phoneticLookup("") === 'undefined', 'phoneticLookup("") should equal undefined'); + testString: assert(typeof phoneticLookup("") === 'undefined'); - text: You should not modify the return statement - testString: assert(code.match(/return\sresult;/), 'You should not modify the return statement'); + testString: assert(code.match(/return\sresult;/)); - text: You should not use case, switch, or if statements testString: assert(!/case|switch|if/g.test(code.replace(/([/]{2}.*)|([/][*][^/*]*[*][/])/g,'')), 'You should not use case, switch, or if statements'); diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.english.md index c83e035070..64514d0a9d 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.english.md @@ -32,11 +32,11 @@ Each time the function is called it will print out the message "Hello Worl ```yml tests: - text: reusableFunction should be a function - testString: assert(typeof reusableFunction === 'function', 'reusableFunction should be a function'); + testString: assert(typeof reusableFunction === 'function'); - text: reusableFunction should output "Hi World" to the dev console - testString: assert(hiWorldWasLogged, 'reusableFunction should output "Hi World" to the dev console'); + testString: assert(hiWorldWasLogged); - text: Call reusableFunction after you define it - testString: assert(/^\s*reusableFunction\(\)\s*/m.test(code), 'Call reusableFunction after you define it'); + testString: assert(/^\s*reusableFunction\(\)\s*/m.test(code)); ```