|
53 | 53 | "id": "a202eed8fc186c8434cb6d61", |
54 | 54 | "title": "Reverse a String", |
55 | 55 | "tests": [ |
56 | | - "assert(typeof reverseString(\"hello\") === \"string\", 'message: <code>reverseString()</code> should return a string.');", |
| 56 | + "assert(typeof reverseString(\"hello\") === \"string\", 'message: <code>reverseString(\"hello\")</code> should return a string.');", |
57 | 57 | "assert(reverseString(\"hello\") === \"olleh\", 'message: <code>reverseString(\"hello\")</code> should become <code>\"olleh\"</code>.');", |
58 | 58 | "assert(reverseString(\"Howdy\") === \"ydwoH\", 'message: <code>reverseString(\"Howdy\")</code> should become <code>\"ydwoH\"</code>.');", |
59 | 59 | "assert(reverseString(\"Greetings from Earth\") === \"htraE morf sgniteerG\", 'message: <code>reverseString(\"Greetings from Earth\")</code> should return <code>\"htraE morf sgniteerG\"</code>.');" |
|
102 | 102 | "id": "a302f7aae1aa3152a5b413bc", |
103 | 103 | "title": "Factorialize a Number", |
104 | 104 | "tests": [ |
105 | | - "assert(typeof factorialize(5) === \"number\", 'message: <code>factorialize()</code> should return a number.');", |
| 105 | + "assert(typeof factorialize(5) === 'number', 'message: <code>factorialize(5)</code> should return a number.');", |
106 | 106 | "assert(factorialize(5) === 120, 'message: <code>factorialize(5)</code> should return 120.');", |
107 | 107 | "assert(factorialize(10) === 3628800, 'message: <code>factorialize(10)</code> should return 3628800.');", |
108 | 108 | "assert(factorialize(20) === 2432902008176640000, 'message: <code>factorialize(20)</code> should return 2432902008176640000.');", |
|
158 | 158 | "Remember to use <a href=\"//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck\" target=\"_blank\">Read-Search-Ask</a> if you get stuck. Write your own code." |
159 | 159 | ], |
160 | 160 | "tests": [ |
161 | | - "assert(typeof palindrome(\"eye\") === \"boolean\", 'message: <code>palindrome()</code> should return a boolean.');", |
| 161 | + "assert(typeof palindrome(\"eye\") === \"boolean\", 'message: <code>palindrome(\"eye\")</code> should return a boolean.');", |
162 | 162 | "assert(palindrome(\"eye\") === true, 'message: <code>palindrome(\"eye\")</code> should return true.');", |
163 | 163 | "assert(palindrome(\"race car\") === true, 'message: <code>palindrome(\"race car\")</code> should return true.');", |
164 | 164 | "assert(palindrome(\"not a palindrome\") === false, 'message: <code>palindrome(\"not a palindrome\")</code> should return false.');", |
|
222 | 222 | "findLongestWord(\"The quick brown fox jumped over the lazy dog\");" |
223 | 223 | ], |
224 | 224 | "tests": [ |
225 | | - "assert(typeof findLongestWord(\"The quick brown fox jumped over the lazy dog\") === \"number\", 'message: <code>findLongestWord()</code> should return a number.');", |
| 225 | + "assert(typeof findLongestWord(\"The quick brown fox jumped over the lazy dog\") === \"number\", 'message: <code>findLongestWord(\"The quick brown fox jumped over the lazy dog\")</code> should return a number.');", |
226 | 226 | "assert(findLongestWord(\"The quick brown fox jumped over the lazy dog\") === 6, 'message: <code>findLongestWord(\"The quick brown fox jumped over the lazy dog\")</code> should return 6.');", |
227 | 227 | "assert(findLongestWord(\"May the force be with you\") === 5, 'message: <code>findLongestWord(\"May the force be with you\")</code> should return 5.');", |
228 | 228 | "assert(findLongestWord(\"Google do a barrel roll\") === 6, 'message: <code>findLongestWord(\"Google do a barrel roll\")</code> should return 6.');", |
|
269 | 269 | "titleCase(\"I'm a little tea pot\");" |
270 | 270 | ], |
271 | 271 | "tests": [ |
272 | | - "assert(typeof titleCase(\"I'm a little tea pot\") === \"string\", 'message: <code>titleCase()</code> should return a string.');", |
| 272 | + "assert(typeof titleCase(\"I'm a little tea pot\") === \"string\", 'message: <code>titleCase(\"I'm a little tea pot\")</code> should return a string.');", |
273 | 273 | "assert(titleCase(\"I'm a little tea pot\") === \"I'm A Little Tea Pot\", 'message: <code>titleCase(\"I'm a little tea pot\")</code> should return \"I'm A Little Tea Pot\".');", |
274 | 274 | "assert(titleCase(\"sHoRt AnD sToUt\") === \"Short And Stout\", 'message: <code>titleCase(\"sHoRt AnD sToUt\")</code> should return \"Short And Stout\".');", |
275 | 275 | "assert(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\") === \"Here Is My Handle Here Is My Spout\", 'message: <code>titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")</code> should return \"Here Is My Handle Here Is My Spout\".');" |
|
314 | 314 | "largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);" |
315 | 315 | ], |
316 | 316 | "tests": [ |
317 | | - "assert(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]).constructor === Array, 'message: <code>largestOfFour()</code> should return an array.');", |
| 317 | + "assert(largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]).constructor === Array, 'message: <code>largestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return an array.');", |
318 | 318 | "assert.deepEqual(largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]]), [27,5,39,1001], 'message: <code>largestOfFour([[13, 27, 18, 26], [4, 5, 1, 3], [32, 35, 37, 39], [1000, 1001, 857, 1]])</code> should return <code>[27,5,39,1001]</code>.');", |
319 | 319 | "assert.deepEqual(largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]]), [9,35,97,1000000], 'message: <code>largestOfFour([[4, 9, 1, 3], [13, 35, 18, 26], [32, 35, 97, 39], [1000000, 1001, 857, 1]])</code> should return <code>[9, 35, 97, 1000000]</code>.');" |
320 | 320 | ], |
|
0 commit comments