diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.english.md
index ab15e8f4f9..ea64ab1b85 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.english.md
@@ -43,13 +43,13 @@ In order to complete this challenge, set the 2nd position (index 1
)
```yml
tests:
- text: myArray[0]
is equal to "a"
- testString: assert.strictEqual(myArray[0], "a", 'myArray[0]
is equal to "a"
');
+ testString: assert.strictEqual(myArray[0], "a");
- text: myArray[1]
is no longer set to "b"
- testString: assert.notStrictEqual(myArray[1], "b", 'myArray[1]
is no longer set to "b"
');
+ testString: assert.notStrictEqual(myArray[1], "b");
- text: myArray[2]
is equal to "c"
- testString: assert.strictEqual(myArray[2], "c", 'myArray[2]
is equal to "c"
');
+ testString: assert.strictEqual(myArray[2], "c");
- text: myArray[3]
is equal to "d"
- testString: assert.strictEqual(myArray[3], "d", 'myArray[3]
is equal to "d"
');
+ testString: assert.strictEqual(myArray[3], "d");
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.english.md
index c25251699d..50e2ffbdf7 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.english.md
@@ -31,11 +31,11 @@ tests:
- text: 'The foods
object should have only the following key-value pairs: apples: 25
, oranges: 32
, plums: 28
, bananas: 13
, grapes: 35
, strawberries: 27
'
testString: 'assert.deepEqual(foods, {apples: 25, oranges: 32, plums: 28, bananas: 13, grapes: 35, strawberries: 27}, ''The foods
object should have only the following key-value pairs: apples: 25
, oranges: 32
, plums: 28
, bananas: 13
, grapes: 35
, strawberries: 27
'');'
- text: checkInventory("apples")
should return 25
- testString: assert.strictEqual(checkInventory('apples'), 25, 'checkInventory("apples")
should return 25
');
+ testString: assert.strictEqual(checkInventory('apples'), 25);
- text: checkInventory("bananas")
should return 13
- testString: assert.strictEqual(checkInventory('bananas'), 13, 'checkInventory("bananas")
should return 13
');
+ testString: assert.strictEqual(checkInventory('bananas'), 13);
- text: checkInventory("strawberries")
should return 27
- testString: assert.strictEqual(checkInventory('strawberries'), 27, 'checkInventory("strawberries")
should return 27
');
+ testString: assert.strictEqual(checkInventory('strawberries'), 27);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-items-using-splice.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-items-using-splice.english.md
index b6fff4464f..b1897c74a7 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-items-using-splice.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-items-using-splice.english.md
@@ -37,11 +37,11 @@ tests:
- text: htmlColorNames
should return ["DarkSalmon", "BlanchedAlmond", "LavenderBlush", "PaleTurqoise", "FireBrick"]
testString: assert.deepEqual(htmlColorNames(['DarkGoldenRod', 'WhiteSmoke', 'LavenderBlush', 'PaleTurqoise', 'FireBrick']), ['DarkSalmon', 'BlanchedAlmond', 'LavenderBlush', 'PaleTurqoise', 'FireBrick'], 'htmlColorNames
should return ["DarkSalmon", "BlanchedAlmond", "LavenderBlush", "PaleTurqoise", "FireBrick"]
');
- text: The htmlColorNames
function should utilize the splice()
method
- testString: assert(/.splice/.test(code), 'The htmlColorNames
function should utilize the splice()
method');
+ testString: assert(/.splice/.test(code));
- text: You should not use shift()
or unshift()
.
- testString: assert(!/shift|unshift/.test(code), 'You should not use shift()
or unshift()
.');
+ testString: assert(!/shift|unshift/.test(code));
- text: You should not use array bracket notation.
- testString: assert(!/\[\d\]\s*=/.test(code), 'You should not use array bracket notation.');
+ testString: assert(!/\[\d\]\s*=/.test(code));
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.english.md
index cebeff038e..a98e6dec58 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.english.md
@@ -45,15 +45,15 @@ Using the same syntax, we can also add new key-value p
```yml
tests:
- text: foods
is an object
- testString: assert(typeof foods === 'object', 'foods
is an object');
+ testString: assert(typeof foods === 'object');
- text: The foods
object has a key "bananas"
with a value of 13
- testString: assert(foods.bananas === 13, 'The foods
object has a key "bananas"
with a value of 13
');
+ testString: assert(foods.bananas === 13);
- text: The foods
object has a key "grapes"
with a value of 35
- testString: assert(foods.grapes === 35, 'The foods
object has a key "grapes"
with a value of 35
');
+ testString: assert(foods.grapes === 35);
- text: The foods
object has a key "strawberries"
with a value of 27
- testString: assert(foods.strawberries === 27, 'The foods
object has a key "strawberries"
with a value of 27
');
+ testString: assert(foods.strawberries === 27);
- text: The key-value pairs should be set using dot or bracket notation
- testString: assert(code.search(/bananas:/) === -1 && code.search(/grapes:/) === -1 && code.search(/strawberries:/) === -1, 'The key-value pairs should be set using dot or bracket notation');
+ testString: assert(code.search(/bananas:/) === -1 && code.search(/grapes:/) === -1 && code.search(/strawberries:/) === -1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md
index af0e148430..130cb0e1be 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/check-for-the-presence-of-an-element-with-indexof.english.md
@@ -34,11 +34,11 @@ tests:
- text: quickCheck(["onions", "squash", "shallots"], "onions")
should return true
testString: assert.strictEqual(quickCheck(['onions', 'squash', 'shallots'], 'onions'), true, 'quickCheck(["onions", "squash", "shallots"], "onions")
should return true
');
- text: quickCheck([3, 5, 9, 125, 45, 2], 125)
should return true
- testString: assert.strictEqual(quickCheck([3, 5, 9, 125, 45, 2], 125), true, 'quickCheck([3, 5, 9, 125, 45, 2], 125)
should return true
');
+ testString: assert.strictEqual(quickCheck([3, 5, 9, 125, 45, 2], 125), true);
- text: quickCheck([true, false, false], undefined)
should return false
- testString: assert.strictEqual(quickCheck([true, false, false], undefined), false, 'quickCheck([true, false, false], undefined)
should return false
');
+ testString: assert.strictEqual(quickCheck([true, false, false], undefined), false);
- text: The quickCheck
function should utilize the indexOf()
method
- testString: assert.notStrictEqual(quickCheck.toString().search(/\.indexOf\(/), -1, 'The quickCheck
function should utilize the indexOf()
method');
+ testString: assert.notStrictEqual(quickCheck.toString().search(/\.indexOf\(/), -1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/combine-arrays-with-the-spread-operator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/combine-arrays-with-the-spread-operator.english.md
index 24429723f1..cef0672daf 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/combine-arrays-with-the-spread-operator.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/combine-arrays-with-the-spread-operator.english.md
@@ -31,7 +31,7 @@ tests:
- text: spreadOut
should return ["learning", "to", "code", "is", "fun"]
testString: assert.deepEqual(spreadOut(), ['learning', 'to', 'code', 'is', 'fun'], 'spreadOut
should return ["learning", "to", "code", "is", "fun"]
');
- text: The spreadOut
function should utilize spread syntax
- testString: assert.notStrictEqual(spreadOut.toString().search(/[...]/), -1, 'The spreadOut
function should utilize spread syntax');
+ testString: assert.notStrictEqual(spreadOut.toString().search(/[...]/), -1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/copy-array-items-using-slice.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/copy-array-items-using-slice.english.md
index 0b4ab707f7..671c0c4e7b 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/copy-array-items-using-slice.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/copy-array-items-using-slice.english.md
@@ -32,7 +32,7 @@ tests:
- text: forecast
should return ["warm", "sunny"]
testString: assert.deepEqual(forecast(['cold', 'rainy', 'warm', 'sunny', 'cool', 'thunderstorms']), ['warm', 'sunny'], 'forecast
should return ["warm", "sunny"]
');
- text: The forecast
function should utilize the slice()
method
- testString: assert(/\.slice\(/.test(code), 'The forecast
function should utilize the slice()
method');
+ testString: assert(/\.slice\(/.test(code));
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/generate-an-array-of-all-object-keys-with-object.keys.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/generate-an-array-of-all-object-keys-with-object.keys.english.md
index 26775891b3..432e17e46f 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/generate-an-array-of-all-object-keys-with-object.keys.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/generate-an-array-of-all-object-keys-with-object.keys.english.md
@@ -20,9 +20,9 @@ Finish writing the getArrayOfUsers
function so that it returns an a
```yml
tests:
- text: The users
object only contains the keys Alan
, Jeff
, Sarah
, and Ryan
- testString: assert('Alan' in users && 'Jeff' in users && 'Sarah' in users && 'Ryan' in users && Object.keys(users).length === 4, 'The users
object only contains the keys Alan
, Jeff
, Sarah
, and Ryan
');
+ testString: assert('Alan' in users && 'Jeff' in users && 'Sarah' in users && 'Ryan' in users && Object.keys(users).length === 4);
- text: The getArrayOfUsers
function returns an array which contains all the keys in the users
object
- testString: assert((function() { users.Sam = {}; users.Lewis = {}; let R = getArrayOfUsers(users); return (R.indexOf('Alan') !== -1 && R.indexOf('Jeff') !== -1 && R.indexOf('Sarah') !== -1 && R.indexOf('Ryan') !== -1 && R.indexOf('Sam') !== -1 && R.indexOf('Lewis') !== -1); })() === true, 'The getArrayOfUsers
function returns an array which contains all the keys in the users
object');
+ testString: assert((function() { users.Sam = {}; users.Lewis = {}; let R = getArrayOfUsers(users); return (R.indexOf('Alan') !== -1 && R.indexOf('Jeff') !== -1 && R.indexOf('Sarah') !== -1 && R.indexOf('Ryan') !== -1 && R.indexOf('Sam') !== -1 && R.indexOf('Lewis') !== -1); })() === true);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-all-an-arrays-items-using-for-loops.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-all-an-arrays-items-using-for-loops.english.md
index 3fcf7af4e1..bb01da3ce4 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-all-an-arrays-items-using-for-loops.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/iterate-through-all-an-arrays-items-using-for-loops.english.md
@@ -38,15 +38,15 @@ We have defined a function, filteredArray
, which takes arrfilteredArray([[10, 8, 3], [14, 6, 23], [3, 18, 6]], 18)
should return [ [10, 8, 3], [14, 6, 23] ]
- testString: assert.deepEqual(filteredArray([ [10, 8, 3], [14, 6, 23], [3, 18, 6] ], 18), [[10, 8, 3], [14, 6, 23]], 'filteredArray([[10, 8, 3], [14, 6, 23], [3, 18, 6]], 18)
should return [ [10, 8, 3], [14, 6, 23] ]
');
+ testString: assert.deepEqual(filteredArray([ [10, 8, 3], [14, 6, 23], [3, 18, 6] ], 18), [[10, 8, 3], [14, 6, 23]]);
- text: filteredArray([ ["trumpets", 2], ["flutes", 4], ["saxophones", 2] ], 2)
should return [ ["flutes", 4] ]
- testString: assert.deepEqual(filteredArray([ ['trumpets', 2], ['flutes', 4], ['saxophones', 2] ], 2), [['flutes', 4]], 'filteredArray([ ["trumpets", 2], ["flutes", 4], ["saxophones", 2] ], 2)
should return [ ["flutes", 4] ]
');
+ testString: assert.deepEqual(filteredArray([ ['trumpets', 2], ['flutes', 4], ['saxophones', 2] ], 2), [['flutes', 4]]);
- text: filteredArray([ ["amy", "beth", "sam"], ["dave", "sean", "peter"] ], "peter")
should return [ ["amy", "beth", "sam"] ]
testString: assert.deepEqual(filteredArray([['amy', 'beth', 'sam'], ['dave', 'sean', 'peter']], 'peter'), [['amy', 'beth', 'sam']], 'filteredArray([ ["amy", "beth", "sam"], ["dave", "sean", "peter"] ], "peter")
should return [ ["amy", "beth", "sam"] ]
');
- text: filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3)
should return [ ]
- testString: assert.deepEqual(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3), [], 'filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3)
should return [ ]
');
+ testString: assert.deepEqual(filteredArray([[3, 2, 3], [1, 6, 3], [3, 13, 26], [19, 3, 9]], 3), []);
- text: The filteredArray
function should utilize a for
loop
- testString: assert.notStrictEqual(filteredArray.toString().search(/for/), -1, 'The filteredArray
function should utilize a for
loop');
+ testString: assert.notStrictEqual(filteredArray.toString().search(/for/), -1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-array-stored-in-an-object.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-array-stored-in-an-object.english.md
index a732343c28..bfd8786cbe 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-array-stored-in-an-object.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-array-stored-in-an-object.english.md
@@ -20,7 +20,7 @@ Take a look at the object we've provided in the code editor. The useruser
object has name
, age
, and data
keys
- testString: assert('name' in user && 'age' in user && 'data' in user, 'The user
object has name
, age
, and data
keys');
+ testString: assert('name' in user && 'age' in user && 'data' in user);
- text: The addFriend
function accepts a user
object and a friend
string as arguments and adds the friend to the array of friends
in the user
object
testString: assert((function() { let L1 = user.data.friends.length; addFriend(user, 'Sean'); let L2 = user.data.friends.length; return (L2 === L1 + 1); })(), 'The addFriend
function accepts a user
object and a friend
string as arguments and adds the friend to the array of friends
in the user
object');
- text: addFriend(user, "Pete")
should return ["Sam", "Kira", "Tomo", "Pete"]
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.english.md
index 4c747956e4..9b989fea8d 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.english.md
@@ -37,11 +37,11 @@ Here we've defined an object, userActivity
, which includes another
```yml
tests:
- text: userActivity
has id
, date
and data
properties
- testString: assert('id' in userActivity && 'date' in userActivity && 'data' in userActivity, 'userActivity
has id
, date
and data
properties');
+ testString: assert('id' in userActivity && 'date' in userActivity && 'data' in userActivity);
- text: userActivity
has a data
key set to an object with keys totalUsers
and online
- testString: assert('totalUsers' in userActivity.data && 'online' in userActivity.data, 'userActivity
has a data
key set to an object with keys totalUsers
and online
');
+ testString: assert('totalUsers' in userActivity.data && 'online' in userActivity.data);
- text: The online
property nested in the data
key of userActivity
should be set to 45
- testString: assert(userActivity.data.online === 45, 'The online
property nested in the data
key of userActivity
should be set to 45
');
+ testString: assert(userActivity.data.online === 45);
- text: The online
property is set using dot or bracket notation
testString: 'assert.strictEqual(code.search(/online: 45/), -1, ''The online
property is set using dot or bracket notation'');'
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-from-an-array-with-pop-and-shift.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-from-an-array-with-pop-and-shift.english.md
index 5bb607400c..b6216e450f 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-from-an-array-with-pop-and-shift.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-from-an-array-with-pop-and-shift.english.md
@@ -42,9 +42,9 @@ tests:
- text: popShift(["challenge", "is", "not", "complete"])
should return ["challenge", "complete"]
testString: assert.deepEqual(popShift(['challenge', 'is', 'not', 'complete']), ["challenge", "complete"], 'popShift(["challenge", "is", "not", "complete"])
should return ["challenge", "complete"]
');
- text: The popShift
function should utilize the pop()
method
- testString: assert.notStrictEqual(popShift.toString().search(/\.pop\(/), -1, 'The popShift
function should utilize the pop()
method');
+ testString: assert.notStrictEqual(popShift.toString().search(/\.pop\(/), -1);
- text: The popShift
function should utilize the shift()
method
- testString: assert.notStrictEqual(popShift.toString().search(/\.shift\(/), -1, 'The popShift
function should utilize the shift()
method');
+ testString: assert.notStrictEqual(popShift.toString().search(/\.shift\(/), -1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-using-splice.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-using-splice.english.md
index 54f209c34c..43dedc15b9 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-using-splice.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/remove-items-using-splice.english.md
@@ -39,9 +39,9 @@ We've defined a function, sumOfTen
, which takes an array as an argu
```yml
tests:
- text: sumOfTen
should return 10
- testString: assert.strictEqual(sumOfTen([2, 5, 1, 5, 2, 1]), 10, 'sumOfTen
should return 10');
+ testString: assert.strictEqual(sumOfTen([2, 5, 1, 5, 2, 1]), 10);
- text: The sumOfTen
function should utilize the splice()
method
- testString: assert.notStrictEqual(sumOfTen.toString().search(/\.splice\(/), -1, 'The sumOfTen
function should utilize the splice()
method');
+ testString: assert.notStrictEqual(sumOfTen.toString().search(/\.splice\(/), -1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.english.md
index 8257359b4a..7aa6c2fdd6 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.english.md
@@ -55,15 +55,15 @@ We have defined a variable called yourArray
. Complete the statement
```yml
tests:
- text: yourArray is an array
- testString: assert.strictEqual(Array.isArray(yourArray), true, 'yourArray is an array');
+ testString: assert.strictEqual(Array.isArray(yourArray), true);
- text: yourArray
is at least 5 elements long
- testString: assert.isAtLeast(yourArray.length, 5, 'yourArray
is at least 5 elements long');
+ testString: assert.isAtLeast(yourArray.length, 5);
- text: yourArray
contains at least one boolean
- testString: assert(yourArray.filter( el => typeof el === 'boolean').length >= 1, 'yourArray
contains at least one boolean
');
+ testString: assert(yourArray.filter( el => typeof el === 'boolean').length >= 1);
- text: yourArray
contains at least one number
- testString: assert(yourArray.filter( el => typeof el === 'number').length >= 1, 'yourArray
contains at least one number
');
+ testString: assert(yourArray.filter( el => typeof el === 'number').length >= 1);
- text: yourArray
contains at least one string
- testString: assert(yourArray.filter( el => typeof el === 'string').length >= 1, 'yourArray
contains at least one string
');
+ testString: assert(yourArray.filter( el => typeof el === 'string').length >= 1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-the-delete-keyword-to-remove-object-properties.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-the-delete-keyword-to-remove-object-properties.english.md
index f8abd6aa2c..ceeb9dc243 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-the-delete-keyword-to-remove-object-properties.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-data-structures/use-the-delete-keyword-to-remove-object-properties.english.md
@@ -29,7 +29,7 @@ tests:
- text: 'The foods
object only has three keys: apples
, grapes
, and bananas
'
testString: 'assert(!foods.hasOwnProperty(''oranges'') && !foods.hasOwnProperty(''plums'') && !foods.hasOwnProperty(''strawberries'') && Object.keys(foods).length === 3, ''The foods
object only has three keys: apples
, grapes
, and bananas
'');'
- text: The oranges
, plums
, and strawberries
keys are removed using delete
- testString: assert(code.search(/oranges:/) !== -1 && code.search(/plums:/) !== -1 && code.search(/strawberries:/) !== -1, 'The oranges
, plums
, and strawberries
keys are removed using delete
');
+ testString: assert(code.search(/oranges:/) !== -1 && code.search(/plums:/) !== -1 && code.search(/strawberries:/) !== -1);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.english.md
index 424f41cdb0..878f3f875c 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/arguments-optional.english.md
@@ -27,15 +27,15 @@ Remember to use addTogether(2, 3) should return 5.');
+ testString: assert.deepEqual(addTogether(2, 3), 5);
- text: addTogether(2)(3)
should return 5.
- testString: assert.deepEqual(addTogether(2)(3), 5, 'addTogether(2)(3)
should return 5.');
+ testString: assert.deepEqual(addTogether(2)(3), 5);
- text: addTogether("http://bit.ly/IqT6zt")
should return undefined.
- testString: assert.isUndefined(addTogether("http://bit.ly/IqT6zt"), 'addTogether("http://bit.ly/IqT6zt")
should return undefined.');
+ testString: assert.isUndefined(addTogether("http://bit.ly/IqT6zt"));
- text: addTogether(2, "3")
should return undefined.
- testString: assert.isUndefined(addTogether(2, "3"), 'addTogether(2, "3")
should return undefined.');
+ testString: assert.isUndefined(addTogether(2, "3"));
- text: addTogether(2)([3])
should return undefined.
- testString: assert.isUndefined(addTogether(2)([3]), 'addTogether(2)([3])
should return undefined.');
+ testString: assert.isUndefined(addTogether(2)([3]));
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/binary-agents.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/binary-agents.english.md
index bd343ba7ad..c0376e2bd7 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/binary-agents.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/binary-agents.english.md
@@ -23,9 +23,9 @@ Remember to use binaryAgent("01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111") should return "Aren't bonfires fun!?"');
+ testString: assert.deepEqual(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111'), "Aren't bonfires fun!?");
- text: binaryAgent("01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001")
should return "I love FreeCodeCamp!"
- testString: assert.deepEqual(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001'), "I love FreeCodeCamp!", 'binaryAgent("01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001")
should return "I love FreeCodeCamp!"');
+ testString: assert.deepEqual(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001'), "I love FreeCodeCamp!");
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.english.md
index efa66e4b90..6d44e4d035 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/diff-two-arrays.english.md
@@ -23,35 +23,35 @@ Remember to use diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]) should return an array.');
+ testString: assert(typeof diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]) === "object");
- text: ["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return ["pink wool"]
.
- testString: assert.sameMembers(diffArray(["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]), ["pink wool"], '["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return ["pink wool"]
.');
+ testString: assert.sameMembers(diffArray(["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]), ["pink wool"]);
- text: ["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return an array with one item.
- testString: assert(diffArray(["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]).length === 1, '["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return an array with one item.');
+ testString: assert(diffArray(["diorite", "andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]).length === 1);
- text: ["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return ["diorite", "pink wool"]
.
- testString: assert.sameMembers(diffArray(["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]), ["diorite", "pink wool"], '["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return ["diorite", "pink wool"]
.');
+ testString: assert.sameMembers(diffArray(["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]), ["diorite", "pink wool"]);
- text: ["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return an array with two items.
- testString: assert(diffArray(["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]).length === 2, '["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]
should return an array with two items.');
+ testString: assert(diffArray(["andesite", "grass", "dirt", "pink wool", "dead shrub"], ["diorite", "andesite", "grass", "dirt", "dead shrub"]).length === 2);
- text: ["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]
should return []
.
- testString: assert.sameMembers(diffArray(["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]), [], '["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]
should return []
.');
+ testString: assert.sameMembers(diffArray(["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]), []);
- text: ["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]
should return an empty array.
- testString: assert(diffArray(["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]).length === 0, '["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]
should return an empty array.');
+ testString: assert(diffArray(["andesite", "grass", "dirt", "dead shrub"], ["andesite", "grass", "dirt", "dead shrub"]).length === 0);
- text: [1, 2, 3, 5], [1, 2, 3, 4, 5]
should return [4]
.
- testString: assert.sameMembers(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], '[1, 2, 3, 5], [1, 2, 3, 4, 5]
should return [4]
.');
+ testString: assert.sameMembers(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4]);
- text: [1, 2, 3, 5], [1, 2, 3, 4, 5]
should return an array with one item.
- testString: assert(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]).length === 1, '[1, 2, 3, 5], [1, 2, 3, 4, 5]
should return an array with one item.');
+ testString: assert(diffArray([1, 2, 3, 5], [1, 2, 3, 4, 5]).length === 1);
- text: [1, "calf", 3, "piglet"], [1, "calf", 3, 4]
should return ["piglet", 4]
.
- testString: assert.sameMembers(diffArray([1, "calf", 3, "piglet"], [1, "calf", 3, 4]), ["piglet", 4], '[1, "calf", 3, "piglet"], [1, "calf", 3, 4]
should return ["piglet", 4]
.');
+ testString: assert.sameMembers(diffArray([1, "calf", 3, "piglet"], [1, "calf", 3, 4]), ["piglet", 4]);
- text: [1, "calf", 3, "piglet"], [1, "calf", 3, 4]
should return an array with two items.
- testString: assert(diffArray([1, "calf", 3, "piglet"], [1, "calf", 3, 4]).length === 2, '[1, "calf", 3, "piglet"], [1, "calf", 3, 4]
should return an array with two items.');
+ testString: assert(diffArray([1, "calf", 3, "piglet"], [1, "calf", 3, 4]).length === 2);
- text: [], ["snuffleupagus", "cookie monster", "elmo"]
should return ["snuffleupagus", "cookie monster", "elmo"]
.
- testString: assert.sameMembers(diffArray([], ["snuffleupagus", "cookie monster", "elmo"]), ["snuffleupagus", "cookie monster", "elmo"], '[], ["snuffleupagus", "cookie monster", "elmo"]
should return ["snuffleupagus", "cookie monster", "elmo"]
.');
+ testString: assert.sameMembers(diffArray([], ["snuffleupagus", "cookie monster", "elmo"]), ["snuffleupagus", "cookie monster", "elmo"]);
- text: [], ["snuffleupagus", "cookie monster", "elmo"]
should return an array with three items.
- testString: assert(diffArray([], ["snuffleupagus", "cookie monster", "elmo"]).length === 3, '[], ["snuffleupagus", "cookie monster", "elmo"]
should return an array with three items.');
+ testString: assert(diffArray([], ["snuffleupagus", "cookie monster", "elmo"]).length === 3);
- text: [1, "calf", 3, "piglet"], [7, "filly"]
should return [1, "calf", 3, "piglet", 7, "filly"]
.
- testString: assert.sameMembers(diffArray([1, "calf", 3, "piglet"], [7, "filly"]), [1, "calf", 3, "piglet", 7, "filly"], '[1, "calf", 3, "piglet"], [7, "filly"]
should return [1, "calf", 3, "piglet", 7, "filly"]
.');
+ testString: assert.sameMembers(diffArray([1, "calf", 3, "piglet"], [7, "filly"]), [1, "calf", 3, "piglet", 7, "filly"]);
- text: [1, "calf", 3, "piglet"], [7, "filly"]
should return an array with six items.
- testString: assert(diffArray([1, "calf", 3, "piglet"], [7, "filly"]).length === 6, '[1, "calf", 3, "piglet"], [7, "filly"]
should return an array with six items.');
+ testString: assert(diffArray([1, "calf", 3, "piglet"], [7, "filly"]).length === 6);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.english.md
index 79eeca07a1..01cbf82b18 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/dna-pairing.english.md
@@ -26,11 +26,11 @@ Remember to use pairElement("ATCGA") should return [["A","T"],["T","A"],["C","G"],["G","C"],["A","T"]]
.');
+ testString: assert.deepEqual(pairElement("ATCGA"),[["A","T"],["T","A"],["C","G"],["G","C"],["A","T"]]);
- text: pairElement("TTGAG")
should return [["T","A"],["T","A"],["G","C"],["A","T"],["G","C"]]
.
- testString: assert.deepEqual(pairElement("TTGAG"),[["T","A"],["T","A"],["G","C"],["A","T"],["G","C"]], 'pairElement("TTGAG")
should return [["T","A"],["T","A"],["G","C"],["A","T"],["G","C"]]
.');
+ testString: assert.deepEqual(pairElement("TTGAG"),[["T","A"],["T","A"],["G","C"],["A","T"],["G","C"]]);
- text: pairElement("CTCTA")
should return [["C","G"],["T","A"],["C","G"],["T","A"],["A","T"]]
.
- testString: assert.deepEqual(pairElement("CTCTA"),[["C","G"],["T","A"],["C","G"],["T","A"],["A","T"]], 'pairElement("CTCTA")
should return [["C","G"],["T","A"],["C","G"],["T","A"],["A","T"]]
.');
+ testString: assert.deepEqual(pairElement("CTCTA"),[["C","G"],["T","A"],["C","G"],["T","A"],["A","T"]]);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.english.md
index 17f525256b..0a654e311d 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.english.md
@@ -23,17 +23,17 @@ Remember to use dropElements([1, 2, 3, 4], function(n) {return n >= 3;}) should return [3, 4]
.');
+ testString: assert.deepEqual(dropElements([1, 2, 3, 4], function(n) {return n >= 3;}), [3, 4]);
- text: dropElements([0, 1, 0, 1], function(n) {return n === 1;})
should return [1, 0, 1]
.
- testString: assert.deepEqual(dropElements([0, 1, 0, 1], function(n) {return n === 1;}), [1, 0, 1], 'dropElements([0, 1, 0, 1], function(n) {return n === 1;})
should return [1, 0, 1]
.');
+ testString: assert.deepEqual(dropElements([0, 1, 0, 1], function(n) {return n === 1;}), [1, 0, 1]);
- text: dropElements([1, 2, 3], function(n) {return n > 0;})
should return [1, 2, 3]
.
- testString: assert.deepEqual(dropElements([1, 2, 3], function(n) {return n > 0;}), [1, 2, 3], 'dropElements([1, 2, 3], function(n) {return n > 0;})
should return [1, 2, 3]
.');
+ testString: assert.deepEqual(dropElements([1, 2, 3], function(n) {return n > 0;}), [1, 2, 3]);
- text: dropElements([1, 2, 3, 4], function(n) {return n > 5;})
should return []
.
- testString: assert.deepEqual(dropElements([1, 2, 3, 4], function(n) {return n > 5;}), [], 'dropElements([1, 2, 3, 4], function(n) {return n > 5;})
should return []
.');
+ testString: assert.deepEqual(dropElements([1, 2, 3, 4], function(n) {return n > 5;}), []);
- text: dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})
should return [7, 4]
.
- testString: assert.deepEqual(dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;}), [7, 4], 'dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;})
should return [7, 4]
.');
+ testString: assert.deepEqual(dropElements([1, 2, 3, 7, 4], function(n) {return n > 3;}), [7, 4]);
- text: dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})
should return [3, 9, 2]
.
- testString: assert.deepEqual(dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;}), [3, 9, 2], 'dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})
should return [3, 9, 2]
.');
+ testString: assert.deepEqual(dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;}), [3, 9, 2]);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.english.md
index 9156bd3779..1b69ef6e69 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/make-a-person.english.md
@@ -34,13 +34,13 @@ Remember to use Object.keys(bob).length should return 6.');
+ testString: assert.deepEqual(Object.keys(bob).length, 6);
- text: bob instanceof Person
should return true.
- testString: assert.deepEqual(bob instanceof Person, true, 'bob instanceof Person
should return true.');
+ testString: assert.deepEqual(bob instanceof Person, true);
- text: bob.firstName
should return undefined.
- testString: assert.deepEqual(bob.firstName, undefined, 'bob.firstName
should return undefined.');
+ testString: assert.deepEqual(bob.firstName, undefined);
- text: bob.lastName
should return undefined.
- testString: assert.deepEqual(bob.lastName, undefined, 'bob.lastName
should return undefined.');
+ testString: assert.deepEqual(bob.lastName, undefined);
- text: bob.getFirstName()
should return "Bob".
testString: assert.deepEqual(bob.getFirstName(), 'Bob', 'bob.getFirstName()
should return "Bob".');
- text: bob.getLastName()
should return "Ross".
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.english.md
index a49bab0ece..eea3ece141 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters.english.md
@@ -31,7 +31,7 @@ tests:
- text: fearNotLetter("bcdf")
should return "e".
testString: assert.deepEqual(fearNotLetter('bcdf'), 'e', 'fearNotLetter("bcdf")
should return "e".');
- text: fearNotLetter("abcdefghijklmnopqrstuvwxyz")
should return undefined.
- testString: assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'), 'fearNotLetter("abcdefghijklmnopqrstuvwxyz")
should return undefined.');
+ testString: assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'));
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.english.md
index 8f000e2a9d..34460b49a5 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/pig-latin.english.md
@@ -26,17 +26,17 @@ Remember to use translatePigLatin("california") should return "aliforniacay".');
+ testString: assert.deepEqual(translatePigLatin("california"), "aliforniacay");
- text: translatePigLatin("paragraphs")
should return "aragraphspay".
- testString: assert.deepEqual(translatePigLatin("paragraphs"), "aragraphspay", 'translatePigLatin("paragraphs")
should return "aragraphspay".');
+ testString: assert.deepEqual(translatePigLatin("paragraphs"), "aragraphspay");
- text: translatePigLatin("glove")
should return "oveglay".
- testString: assert.deepEqual(translatePigLatin("glove"), "oveglay", 'translatePigLatin("glove")
should return "oveglay".');
+ testString: assert.deepEqual(translatePigLatin("glove"), "oveglay");
- text: translatePigLatin("algorithm")
should return "algorithmway".
- testString: assert.deepEqual(translatePigLatin("algorithm"), "algorithmway", 'translatePigLatin("algorithm")
should return "algorithmway".');
+ testString: assert.deepEqual(translatePigLatin("algorithm"), "algorithmway");
- text: translatePigLatin("eight")
should return "eightway".
- testString: assert.deepEqual(translatePigLatin("eight"), "eightway", 'translatePigLatin("eight")
should return "eightway".');
+ testString: assert.deepEqual(translatePigLatin("eight"), "eightway");
- text: Should handle words where the first vowel comes in the middle of the word. translatePigLatin("schwartz")
should return "artzschway".
- testString: assert.deepEqual(translatePigLatin("schwartz"), "artzschway", 'Should handle words where the first vowel comes in the end of the word.');
+ testString: assert.deepEqual(translatePigLatin("schwartz"), "artzschway");
- text: Should handle words without vowels. translatePigLatin("rhythm")
should return "rhythmay".
testString: assert.deepEqual(translatePigLatin("rhythm"), "rhythmay");
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.english.md
index 9c83f792f1..fe274f1489 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.english.md
@@ -26,15 +26,15 @@ Remember to use myReplace("Let us go to the store", "store", "mall") should return "Let us go to the mall".');
+ testString: assert.deepEqual(myReplace("Let us go to the store", "store", "mall"), "Let us go to the mall");
- text: myReplace("He is Sleeping on the couch", "Sleeping", "sitting")
should return "He is Sitting on the couch".
- testString: assert.deepEqual(myReplace("He is Sleeping on the couch", "Sleeping", "sitting"), "He is Sitting on the couch", 'myReplace("He is Sleeping on the couch", "Sleeping", "sitting")
should return "He is Sitting on the couch".');
+ testString: assert.deepEqual(myReplace("He is Sleeping on the couch", "Sleeping", "sitting"), "He is Sitting on the couch");
- text: myReplace("This has a spellngi error", "spellngi", "spelling")
should return "This has a spelling error".
- testString: assert.deepEqual(myReplace("This has a spellngi error", "spellngi", "spelling"), "This has a spelling error", 'myReplace("This has a spellngi error", "spellngi", "spelling")
should return "This has a spelling error".');
+ testString: assert.deepEqual(myReplace("This has a spellngi error", "spellngi", "spelling"), "This has a spelling error");
- text: myReplace("His name is Tom", "Tom", "john")
should return "His name is John".
- testString: assert.deepEqual(myReplace("His name is Tom", "Tom", "john"), "His name is John", 'myReplace("His name is Tom", "Tom", "john")
should return "His name is John".');
+ testString: assert.deepEqual(myReplace("His name is Tom", "Tom", "john"), "His name is John");
- text: myReplace("Let us get back to more Coding", "Coding", "algorithms")
should return "Let us get back to more Algorithms".
- testString: assert.deepEqual(myReplace("Let us get back to more Coding", "Coding", "algorithms"), "Let us get back to more Algorithms", 'myReplace("Let us get back to more Coding", "Coding", "algorithms")
should return "Let us get back to more Algorithms".');
+ testString: assert.deepEqual(myReplace("Let us get back to more Coding", "Coding", "algorithms"), "Let us get back to more Algorithms");
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.english.md
index 7d45b2a3a0..adfbd56ce7 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/seek-and-destroy.english.md
@@ -23,17 +23,17 @@ Remember to use should return ["hamburger"]
.
- testString: assert.deepEqual(destroyer(["tree", "hamburger", 53], "tree", 53), ["hamburger"], 'destroyer(["tree", "hamburger", 53], "tree", 53)
should return ["hamburger"]
.');
+ testString: assert.deepEqual(destroyer(["tree", "hamburger", 53], "tree", 53), ["hamburger"]);
- text: destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan")
should return [12,92,65]
.
- testString: assert.deepEqual(destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan"), [12,92,65], 'destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan")
should return [12,92,65]
.');
+ testString: assert.deepEqual(destroyer(["possum", "trollo", 12, "safari", "hotdog", 92, 65, "grandma", "bugati", "trojan", "yacht"], "yacht", "possum", "trollo", "safari", "hotdog", "grandma", "bugati", "trojan"), [12,92,65]);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.english.md
index 4301ca0a0c..a169144f47 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple.english.md
@@ -26,15 +26,15 @@ tests:
- text: smallestCommons([1, 5])
should return a number.
testString: assert.deepEqual(typeof smallestCommons([1, 5]), 'number', 'smallestCommons([1, 5])
should return a number.');
- text: smallestCommons([1, 5])
should return 60.
- testString: assert.deepEqual(smallestCommons([1, 5]), 60, 'smallestCommons([1, 5])
should return 60.');
+ testString: assert.deepEqual(smallestCommons([1, 5]), 60);
- text: smallestCommons([5, 1])
should return 60.
- testString: assert.deepEqual(smallestCommons([5, 1]), 60, 'smallestCommons([5, 1])
should return 60.');
+ testString: assert.deepEqual(smallestCommons([5, 1]), 60);
- text: smallestCommons([2, 10])
should return 2520.
- testString: assert.deepEqual(smallestCommons([2, 10]), 2520, 'smallestCommons([2, 10])
should return 2520.');
+ testString: assert.deepEqual(smallestCommons([2, 10]), 2520);
- text: smallestCommons([1, 13])
should return 360360.
- testString: assert.deepEqual(smallestCommons([1, 13]), 360360, 'smallestCommons([1, 13])
should return 360360.');
+ testString: assert.deepEqual(smallestCommons([1, 13]), 360360);
- text: smallestCommons([23, 18])
should return 6056820.
- testString: assert.deepEqual(smallestCommons([23, 18]), 6056820, 'smallestCommons([23, 18])
should return 6056820.');
+ testString: assert.deepEqual(smallestCommons([23, 18]), 6056820);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.english.md
index e8077b88fd..c4c4b37357 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sorted-union.english.md
@@ -25,11 +25,11 @@ Remember to use uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]) should return [1, 3, 2, 5, 4]
.');
+ testString: assert.deepEqual(uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4]);
- text: uniteUnique([1, 2, 3], [5, 2, 1])
should return [1, 2, 3, 5]
.
- testString: assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5], 'uniteUnique([1, 2, 3], [5, 2, 1])
should return [1, 2, 3, 5]
.');
+ testString: assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5]);
- text: uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])
should return [1, 2, 3, 5, 4, 6, 7, 8]
.
- testString: assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [1, 2, 3, 5, 4, 6, 7, 8], 'uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])
should return [1, 2, 3, 5, 4, 6, 7, 8]
.');
+ testString: assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [1, 2, 3, 5, 4, 6, 7, 8]);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.english.md
index b1570aa13c..c8a8ca476c 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/spinal-tap-case.english.md
@@ -22,15 +22,15 @@ Remember to use spinalCase("This Is Spinal Tap") should return "this-is-spinal-tap"
.');
+ testString: assert.deepEqual(spinalCase("This Is Spinal Tap"), "this-is-spinal-tap");
- text: spinalCase("thisIsSpinalTap")
should return "this-is-spinal-tap"
.
- testString: assert.strictEqual(spinalCase('thisIsSpinalTap'), "this-is-spinal-tap", 'spinalCase("thisIsSpinalTap")
should return "this-is-spinal-tap"
.');
+ testString: assert.strictEqual(spinalCase('thisIsSpinalTap'), "this-is-spinal-tap");
- text: spinalCase("The_Andy_Griffith_Show")
should return "the-andy-griffith-show"
.
- testString: assert.strictEqual(spinalCase("The_Andy_Griffith_Show"), "the-andy-griffith-show", 'spinalCase("The_Andy_Griffith_Show")
should return "the-andy-griffith-show"
.');
+ testString: assert.strictEqual(spinalCase("The_Andy_Griffith_Show"), "the-andy-griffith-show");
- text: spinalCase("Teletubbies say Eh-oh")
should return "teletubbies-say-eh-oh"
.
- testString: assert.strictEqual(spinalCase("Teletubbies say Eh-oh"), "teletubbies-say-eh-oh", 'spinalCase("Teletubbies say Eh-oh")
should return "teletubbies-say-eh-oh"
.');
+ testString: assert.strictEqual(spinalCase("Teletubbies say Eh-oh"), "teletubbies-say-eh-oh");
- text: spinalCase("AllThe-small Things")
should return "all-the-small-things"
.
- testString: assert.strictEqual(spinalCase("AllThe-small Things"), "all-the-small-things", 'spinalCase("AllThe-small Things")
should return "all-the-small-things"
.');
+ testString: assert.strictEqual(spinalCase("AllThe-small Things"), "all-the-small-things");
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md
index 0ca0a89131..d1b0cae88b 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.english.md
@@ -22,13 +22,13 @@ Remember to use steamrollArray([[["a"]], [["b"]]]) should return ["a", "b"]
.');
+ testString: assert.deepEqual(steamrollArray([[["a"]], [["b"]]]), ["a", "b"]);
- text: steamrollArray([1, [2], [3, [[4]]]])
should return [1, 2, 3, 4]
.
- testString: assert.deepEqual(steamrollArray([1, [2], [3, [[4]]]]), [1, 2, 3, 4], 'steamrollArray([1, [2], [3, [[4]]]])
should return [1, 2, 3, 4]
.');
+ testString: assert.deepEqual(steamrollArray([1, [2], [3, [[4]]]]), [1, 2, 3, 4]);
- text: steamrollArray([1, [], [3, [[4]]]])
should return [1, 3, 4]
.
- testString: assert.deepEqual(steamrollArray([1, [], [3, [[4]]]]), [1, 3, 4], 'steamrollArray([1, [], [3, [[4]]]])
should return [1, 3, 4]
.');
+ testString: assert.deepEqual(steamrollArray([1, [], [3, [[4]]]]), [1, 3, 4]);
- text: steamrollArray([1, {}, [3, [[4]]]])
should return [1, {}, 3, 4]
.
- testString: assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4], 'steamrollArray([1, {}, [3, [[4]]]])
should return [1, {}, 3, 4]
.');
+ testString: assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4]);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.english.md
index c107c6da56..cfebe254cd 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-numbers-in-a-range.english.md
@@ -26,15 +26,15 @@ Remember to use sumAll([1, 4]) should return a number.');
+ testString: assert(typeof sumAll([1, 4]) === 'number');
- text: sumAll([1, 4])
should return 10.
- testString: assert.deepEqual(sumAll([1, 4]), 10, 'sumAll([1, 4])
should return 10.');
+ testString: assert.deepEqual(sumAll([1, 4]), 10);
- text: sumAll([4, 1])
should return 10.
- testString: assert.deepEqual(sumAll([4, 1]), 10, 'sumAll([4, 1])
should return 10.');
+ testString: assert.deepEqual(sumAll([4, 1]), 10);
- text: sumAll([5, 10])
should return 45.
- testString: assert.deepEqual(sumAll([5, 10]), 45, 'sumAll([5, 10])
should return 45.');
+ testString: assert.deepEqual(sumAll([5, 10]), 45);
- text: sumAll([10, 5])
should return 45.
- testString: assert.deepEqual(sumAll([10, 5]), 45, 'sumAll([10, 5])
should return 45.');
+ testString: assert.deepEqual(sumAll([10, 5]), 45);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.english.md
index ddb12e73db..cd7736f244 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-odd-fibonacci-numbers.english.md
@@ -24,17 +24,17 @@ Remember to use sumFibs(1) should return a number.');
+ testString: assert(typeof sumFibs(1) === "number");
- text: sumFibs(1000)
should return 1785.
- testString: assert(sumFibs(1000) === 1785, 'sumFibs(1000)
should return 1785.');
+ testString: assert(sumFibs(1000) === 1785);
- text: sumFibs(4000000)
should return 4613732.
- testString: assert(sumFibs(4000000) === 4613732, 'sumFibs(4000000)
should return 4613732.');
+ testString: assert(sumFibs(4000000) === 4613732);
- text: sumFibs(4)
should return 5.
- testString: assert(sumFibs(4) === 5, 'sumFibs(4)
should return 5.');
+ testString: assert(sumFibs(4) === 5);
- text: sumFibs(75024)
should return 60696.
- testString: assert(sumFibs(75024) === 60696, 'sumFibs(75024)
should return 60696.');
+ testString: assert(sumFibs(75024) === 60696);
- text: sumFibs(75025)
should return 135721.
- testString: assert(sumFibs(75025) === 135721, 'sumFibs(75025)
should return 135721.');
+ testString: assert(sumFibs(75025) === 135721);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.english.md
index 2e98611787..4b77a1ab76 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.english.md
@@ -26,9 +26,9 @@ tests:
- text: sumPrimes(10)
should return a number.
testString: assert.deepEqual(typeof sumPrimes(10), 'number', 'sumPrimes(10)
should return a number.');
- text: sumPrimes(10)
should return 17.
- testString: assert.deepEqual(sumPrimes(10), 17, 'sumPrimes(10)
should return 17.');
+ testString: assert.deepEqual(sumPrimes(10), 17);
- text: sumPrimes(977)
should return 73156.
- testString: assert.deepEqual(sumPrimes(977), 73156, 'sumPrimes(977)
should return 73156.');
+ testString: assert.deepEqual(sumPrimes(977), 73156);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.english.md
index a35614a77d..138e4c90d2 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.english.md
@@ -25,13 +25,13 @@ Remember to use rot13("SERR PBQR PNZC") should decode to FREE CODE CAMP
');
+ testString: assert(rot13("SERR PBQR PNZC") === "FREE CODE CAMP");
- text: rot13("SERR CVMMN!")
should decode to FREE PIZZA!
- testString: assert(rot13("SERR CVMMN!") === "FREE PIZZA!", 'rot13("SERR CVMMN!")
should decode to FREE PIZZA!
');
+ testString: assert(rot13("SERR CVMMN!") === "FREE PIZZA!");
- text: rot13("SERR YBIR?")
should decode to FREE LOVE?
- testString: assert(rot13("SERR YBIR?") === "FREE LOVE?", 'rot13("SERR YBIR?")
should decode to FREE LOVE?
');
+ testString: assert(rot13("SERR YBIR?") === "FREE LOVE?");
- text: rot13("GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.")
should decode to THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.
- testString: assert(rot13("GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.") === "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.", 'rot13("GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.")
should decode to THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.
');
+ testString: assert(rot13("GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.") === "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.");
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.english.md
index 05d0fc40ae..63be1c27d4 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.english.md
@@ -26,31 +26,31 @@ Remember to use should return a boolean.
- testString: assert(typeof palindrome("eye") === "boolean", 'palindrome("eye")
should return a boolean.');
+ testString: assert(typeof palindrome("eye") === "boolean");
- text: palindrome("eye")
should return true.
- testString: assert(palindrome("eye") === true, 'palindrome("eye")
should return true.');
+ testString: assert(palindrome("eye") === true);
- text: palindrome("_eye")
should return true.
- testString: assert(palindrome("_eye") === true, 'palindrome("_eye")
should return true.');
+ testString: assert(palindrome("_eye") === true);
- text: palindrome("race car")
should return true.
- testString: assert(palindrome("race car") === true, 'palindrome("race car")
should return true.');
+ testString: assert(palindrome("race car") === true);
- text: palindrome("not a palindrome")
should return false.
- testString: assert(palindrome("not a palindrome") === false, 'palindrome("not a palindrome")
should return false.');
+ testString: assert(palindrome("not a palindrome") === false);
- text: palindrome("A man, a plan, a canal. Panama")
should return true.
- testString: assert(palindrome("A man, a plan, a canal. Panama") === true, 'palindrome("A man, a plan, a canal. Panama")
should return true.');
+ testString: assert(palindrome("A man, a plan, a canal. Panama") === true);
- text: palindrome("never odd or even")
should return true.
- testString: assert(palindrome("never odd or even") === true, 'palindrome("never odd or even")
should return true.');
+ testString: assert(palindrome("never odd or even") === true);
- text: palindrome("nope")
should return false.
- testString: assert(palindrome("nope") === false, 'palindrome("nope")
should return false.');
+ testString: assert(palindrome("nope") === false);
- text: palindrome("almostomla")
should return false.
- testString: assert(palindrome("almostomla") === false, 'palindrome("almostomla")
should return false.');
+ testString: assert(palindrome("almostomla") === false);
- text: palindrome("My age is 0, 0 si ega ym.")
should return true.
- testString: assert(palindrome("My age is 0, 0 si ega ym.") === true, 'palindrome("My age is 0, 0 si ega ym.")
should return true.');
+ testString: assert(palindrome("My age is 0, 0 si ega ym.") === true);
- text: palindrome("1 eye for of 1 eye.")
should return false.
- testString: assert(palindrome("1 eye for of 1 eye.") === false, 'palindrome("1 eye for of 1 eye.")
should return false.');
+ testString: assert(palindrome("1 eye for of 1 eye.") === false);
- text: 'palindrome("0_0 (: /-\ :) 0-0")
should return true.'
testString: 'assert(palindrome("0_0 (: /-\ :) 0-0") === true, ''palindrome("0_0 (: /-\ :) 0-0")
should return true.'');'
- text: palindrome("five|\_/|four")
should return false.
- testString: assert(palindrome("five|\_/|four") === false, 'palindrome("five|\_/|four")
should return false.');
+ testString: assert(palindrome("five|\_/|four") === false);
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.english.md
index babc95b2b4..160b346c91 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.english.md
@@ -23,57 +23,57 @@ Remember to use convertToRoman(2) should return "II".');
+ testString: assert.deepEqual(convertToRoman(2), "II");
- text: convertToRoman(3)
should return "III".
- testString: assert.deepEqual(convertToRoman(3), "III", 'convertToRoman(3)
should return "III".');
+ testString: assert.deepEqual(convertToRoman(3), "III");
- text: convertToRoman(4)
should return "IV".
- testString: assert.deepEqual(convertToRoman(4), "IV", 'convertToRoman(4)
should return "IV".');
+ testString: assert.deepEqual(convertToRoman(4), "IV");
- text: convertToRoman(5)
should return "V".
- testString: assert.deepEqual(convertToRoman(5), "V", 'convertToRoman(5)
should return "V".');
+ testString: assert.deepEqual(convertToRoman(5), "V");
- text: convertToRoman(9)
should return "IX".
- testString: assert.deepEqual(convertToRoman(9), "IX", 'convertToRoman(9)
should return "IX".');
+ testString: assert.deepEqual(convertToRoman(9), "IX");
- text: convertToRoman(12)
should return "XII".
- testString: assert.deepEqual(convertToRoman(12), "XII", 'convertToRoman(12)
should return "XII".');
+ testString: assert.deepEqual(convertToRoman(12), "XII");
- text: convertToRoman(16)
should return "XVI".
- testString: assert.deepEqual(convertToRoman(16), "XVI", 'convertToRoman(16)
should return "XVI".');
+ testString: assert.deepEqual(convertToRoman(16), "XVI");
- text: convertToRoman(29)
should return "XXIX".
- testString: assert.deepEqual(convertToRoman(29), "XXIX", 'convertToRoman(29)
should return "XXIX".');
+ testString: assert.deepEqual(convertToRoman(29), "XXIX");
- text: convertToRoman(44)
should return "XLIV".
- testString: assert.deepEqual(convertToRoman(44), "XLIV", 'convertToRoman(44)
should return "XLIV".');
+ testString: assert.deepEqual(convertToRoman(44), "XLIV");
- text: convertToRoman(45)
should return "XLV"
- testString: assert.deepEqual(convertToRoman(45), "XLV", 'convertToRoman(45)
should return "XLV"');
+ testString: assert.deepEqual(convertToRoman(45), "XLV");
- text: convertToRoman(68)
should return "LXVIII"
- testString: assert.deepEqual(convertToRoman(68), "LXVIII", 'convertToRoman(68)
should return "LXVIII"');
+ testString: assert.deepEqual(convertToRoman(68), "LXVIII");
- text: convertToRoman(83)
should return "LXXXIII"
- testString: assert.deepEqual(convertToRoman(83), "LXXXIII", 'convertToRoman(83)
should return "LXXXIII"');
+ testString: assert.deepEqual(convertToRoman(83), "LXXXIII");
- text: convertToRoman(97)
should return "XCVII"
- testString: assert.deepEqual(convertToRoman(97), "XCVII", 'convertToRoman(97)
should return "XCVII"');
+ testString: assert.deepEqual(convertToRoman(97), "XCVII");
- text: convertToRoman(99)
should return "XCIX"
- testString: assert.deepEqual(convertToRoman(99), "XCIX", 'convertToRoman(99)
should return "XCIX"');
+ testString: assert.deepEqual(convertToRoman(99), "XCIX");
- text: convertToRoman(400)
should return "CD"
- testString: assert.deepEqual(convertToRoman(400), "CD", 'convertToRoman(400)
should return "CD"');
+ testString: assert.deepEqual(convertToRoman(400), "CD");
- text: convertToRoman(500)
should return "D"
- testString: assert.deepEqual(convertToRoman(500), "D", 'convertToRoman(500)
should return "D"');
+ testString: assert.deepEqual(convertToRoman(500), "D");
- text: convertToRoman(501)
should return "DI"
- testString: assert.deepEqual(convertToRoman(501), "DI", 'convertToRoman(501)
should return "DI"');
+ testString: assert.deepEqual(convertToRoman(501), "DI");
- text: convertToRoman(649)
should return "DCXLIX"
- testString: assert.deepEqual(convertToRoman(649), "DCXLIX", 'convertToRoman(649)
should return "DCXLIX"');
+ testString: assert.deepEqual(convertToRoman(649), "DCXLIX");
- text: convertToRoman(798)
should return "DCCXCVIII"
- testString: assert.deepEqual(convertToRoman(798), "DCCXCVIII", 'convertToRoman(798)
should return "DCCXCVIII"');
+ testString: assert.deepEqual(convertToRoman(798), "DCCXCVIII");
- text: convertToRoman(891)
should return "DCCCXCI"
- testString: assert.deepEqual(convertToRoman(891), "DCCCXCI", 'convertToRoman(891)
should return "DCCCXCI"');
+ testString: assert.deepEqual(convertToRoman(891), "DCCCXCI");
- text: convertToRoman(1000)
should return "M"
- testString: assert.deepEqual(convertToRoman(1000), "M", 'convertToRoman(1000)
should return "M"');
+ testString: assert.deepEqual(convertToRoman(1000), "M");
- text: convertToRoman(1004)
should return "MIV"
- testString: assert.deepEqual(convertToRoman(1004), "MIV", 'convertToRoman(1004)
should return "MIV"');
+ testString: assert.deepEqual(convertToRoman(1004), "MIV");
- text: convertToRoman(1006)
should return "MVI"
- testString: assert.deepEqual(convertToRoman(1006), "MVI", 'convertToRoman(1006)
should return "MVI"');
+ testString: assert.deepEqual(convertToRoman(1006), "MVI");
- text: convertToRoman(1023)
should return "MXXIII"
- testString: assert.deepEqual(convertToRoman(1023), "MXXIII", 'convertToRoman(1023)
should return "MXXIII"');
+ testString: assert.deepEqual(convertToRoman(1023), "MXXIII");
- text: convertToRoman(2014)
should return "MMXIV"
- testString: assert.deepEqual(convertToRoman(2014), "MMXIV", 'convertToRoman(2014)
should return "MMXIV"');
+ testString: assert.deepEqual(convertToRoman(2014), "MMXIV");
- text: convertToRoman(3999)
should return "MMMCMXCIX"
- testString: assert.deepEqual(convertToRoman(3999), "MMMCMXCIX", 'convertToRoman(3999)
should return "MMMCMXCIX"');
+ testString: assert.deepEqual(convertToRoman(3999), "MMMCMXCIX");
```
diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.english.md
index ab6ef5638a..7a45f64a8b 100644
--- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.english.md
+++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.english.md
@@ -25,59 +25,59 @@ Remember to use telephoneCheck("555-555-5555") should return a boolean.');
+ testString: assert(typeof telephoneCheck("555-555-5555") === "boolean");
- text: telephoneCheck("1 555-555-5555")
should return true.
- testString: assert(telephoneCheck("1 555-555-5555") === true, 'telephoneCheck("1 555-555-5555")
should return true.');
+ testString: assert(telephoneCheck("1 555-555-5555") === true);
- text: telephoneCheck("1 (555) 555-5555")
should return true.
- testString: assert(telephoneCheck("1 (555) 555-5555") === true, 'telephoneCheck("1 (555) 555-5555")
should return true.');
+ testString: assert(telephoneCheck("1 (555) 555-5555") === true);
- text: telephoneCheck("5555555555")
should return true.
- testString: assert(telephoneCheck("5555555555") === true, 'telephoneCheck("5555555555")
should return true.');
+ testString: assert(telephoneCheck("5555555555") === true);
- text: telephoneCheck("555-555-5555")
should return true.
- testString: assert(telephoneCheck("555-555-5555") === true, 'telephoneCheck("555-555-5555")
should return true.');
+ testString: assert(telephoneCheck("555-555-5555") === true);
- text: telephoneCheck("(555)555-5555")
should return true.
- testString: assert(telephoneCheck("(555)555-5555") === true, 'telephoneCheck("(555)555-5555")
should return true.');
+ testString: assert(telephoneCheck("(555)555-5555") === true);
- text: telephoneCheck("1(555)555-5555")
should return true.
- testString: assert(telephoneCheck("1(555)555-5555") === true, 'telephoneCheck("1(555)555-5555")
should return true.');
+ testString: assert(telephoneCheck("1(555)555-5555") === true);
- text: telephoneCheck("555-5555")
should return false.
- testString: assert(telephoneCheck("555-5555") === false, 'telephoneCheck("555-5555")
should return false.');
+ testString: assert(telephoneCheck("555-5555") === false);
- text: telephoneCheck("5555555")
should return false.
- testString: assert(telephoneCheck("5555555") === false, 'telephoneCheck("5555555")
should return false.');
+ testString: assert(telephoneCheck("5555555") === false);
- text: telephoneCheck("1 555)555-5555")
should return false.
- testString: assert(telephoneCheck("1 555)555-5555") === false, 'telephoneCheck("1 555)555-5555")
should return false.');
+ testString: assert(telephoneCheck("1 555)555-5555") === false);
- text: telephoneCheck("1 555 555 5555")
should return true.
- testString: assert(telephoneCheck("1 555 555 5555") === true, 'telephoneCheck("1 555 555 5555")
should return true.');
+ testString: assert(telephoneCheck("1 555 555 5555") === true);
- text: telephoneCheck("1 456 789 4444")
should return true.
- testString: assert(telephoneCheck("1 456 789 4444") === true, 'telephoneCheck("1 456 789 4444")
should return true.');
+ testString: assert(telephoneCheck("1 456 789 4444") === true);
- text: telephoneCheck("123**&!!asdf#")
should return false.
- testString: assert(telephoneCheck("123**&!!asdf#") === false, 'telephoneCheck("123**&!!asdf#")
should return false.');
+ testString: assert(telephoneCheck("123**&!!asdf#") === false);
- text: telephoneCheck("55555555")
should return false.
- testString: assert(telephoneCheck("55555555") === false, 'telephoneCheck("55555555")
should return false.');
+ testString: assert(telephoneCheck("55555555") === false);
- text: telephoneCheck("(6054756961)")
should return false
- testString: assert(telephoneCheck("(6054756961)") === false, 'telephoneCheck("(6054756961)")
should return false');
+ testString: assert(telephoneCheck("(6054756961)") === false);
- text: telephoneCheck("2 (757) 622-7382")
should return false.
- testString: assert(telephoneCheck("2 (757) 622-7382") === false, 'telephoneCheck("2 (757) 622-7382")
should return false.');
+ testString: assert(telephoneCheck("2 (757) 622-7382") === false);
- text: telephoneCheck("0 (757) 622-7382")
should return false.
- testString: assert(telephoneCheck("0 (757) 622-7382") === false, 'telephoneCheck("0 (757) 622-7382")
should return false.');
+ testString: assert(telephoneCheck("0 (757) 622-7382") === false);
- text: telephoneCheck("-1 (757) 622-7382")
should return false
- testString: assert(telephoneCheck("-1 (757) 622-7382") === false, 'telephoneCheck("-1 (757) 622-7382")
should return false');
+ testString: assert(telephoneCheck("-1 (757) 622-7382") === false);
- text: telephoneCheck("2 757 622-7382")
should return false.
- testString: assert(telephoneCheck("2 757 622-7382") === false, 'telephoneCheck("2 757 622-7382")
should return false.');
+ testString: assert(telephoneCheck("2 757 622-7382") === false);
- text: telephoneCheck("10 (757) 622-7382")
should return false.
- testString: assert(telephoneCheck("10 (757) 622-7382") === false, 'telephoneCheck("10 (757) 622-7382")
should return false.');
+ testString: assert(telephoneCheck("10 (757) 622-7382") === false);
- text: telephoneCheck("27576227382")
should return false.
- testString: assert(telephoneCheck("27576227382") === false, 'telephoneCheck("27576227382")
should return false.');
+ testString: assert(telephoneCheck("27576227382") === false);
- text: telephoneCheck("(275)76227382")
should return false.
- testString: assert(telephoneCheck("(275)76227382") === false, 'telephoneCheck("(275)76227382")
should return false.');
+ testString: assert(telephoneCheck("(275)76227382") === false);
- text: telephoneCheck("2(757)6227382")
should return false.
- testString: assert(telephoneCheck("2(757)6227382") === false, 'telephoneCheck("2(757)6227382")
should return false.');
+ testString: assert(telephoneCheck("2(757)6227382") === false);
- text: telephoneCheck("2(757)622-7382")
should return false.
- testString: assert(telephoneCheck("2(757)622-7382") === false, 'telephoneCheck("2(757)622-7382")
should return false.');
+ testString: assert(telephoneCheck("2(757)622-7382") === false);
- text: telephoneCheck("555)-555-5555")
should return false.
- testString: assert(telephoneCheck("555)-555-5555") === false, 'telephoneCheck("555)-555-5555")
should return false.');
+ testString: assert(telephoneCheck("555)-555-5555") === false);
- text: telephoneCheck("(555-555-5555")
should return false.
- testString: assert(telephoneCheck("(555-555-5555") === false, 'telephoneCheck("(555-555-5555")
should return false.');
+ testString: assert(telephoneCheck("(555-555-5555") === false);
- text: telephoneCheck("(555)5(55?)-5555")
should return false.
- testString: assert(telephoneCheck("(555)5(55?)-5555") === false, 'telephoneCheck("(555)5(55?)-5555")
should return false.');
+ testString: assert(telephoneCheck("(555)5(55?)-5555") === false);
```