"challengeEntryPoint": "telephoneCheck("555-555-5555");" }, { <del> "_id": "a202eed8fc186c8434cb6d61", "name": "Reverse a String", "difficulty": "1", "tests": [ "expect(reverseString('hello')).to.be.a('String');", "expect(reverseString('hello')).to.equal('olleh');", "expect(reverseString('Howdy')).to.equal('ydwoH');", "expect(reverseString('Greetings from Earth')).to.equal('htraE morf sgniteerG');" ], </del> <ins> "_id": "556138aff60341a09ed6c480", "name": "Inventory Update", "difficulty": "3.11", </ins> "description": [ <del> "Reverse the provided string.", "You may need to turn the string into an array before you can reverse it.", "Your result must be a string." </del> <ins> "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order." </ins> ], <del> "challengeEntryPoint": "reverseString('hello');", "challengeSeed": "function reverseString(str) {n  return str;rn}" }, { "_id": "a302f7aae1aa3152a5b413bc", "name": "Factorialize a Number", </del> <ins> "challengeEntryPoint": "// Example inventory listsrnvar curInv = [rn    [21, 'Bowling Ball'],rn    [2, 'Dirty Sock'],rn    [1, 'Hair pin'],rn    [5, 'Microphone']rn];rnrnvar newInv = [rn    [2, 'Hair Pin'],rn    [3, 'Half-Eaten Apple'],rn    [67, 'Bowling Ball'],rn    [7, 'Toothpaste']rn];rnrninventory(curInv, newInv);", "challengeSeed": "function inventory(arr1, arr2) {n    // All inventory must be accounted for or you're fired!rn    return arr1;rn}", </ins> "tests": [ <del> "expect(factorialize(5)).to.be.a("Number");", "expect(factorialize(5)).to.equal(120);", "expect(factorialize(10)).to.equal(3628800);", "expect(factorialize(20)).to.equal(2432902008176640000);" ], "difficulty": "1", "description": [ "Return the factorial of the provided integer.", "If the integer is represented with the letter n, a factorial is the product of all positive integers less than or equal to n.", "Factorials are often represented with the shorthand notation n!", "For example: 5! = 1 * 2 * 3 * 4 * 5 = 120f" ], "challengeSeed": "function factorialize(num) {n  return  num;rn}", "challengeEntryPoint": "factorialize(5);" }, { "_id": "a26cbbe9ad8655a977e1ceb5", "name": "Find the Longest Word in a String", "difficulty": "1", "description": [ "Return the length of the longest word in the provided sentence.", "Your response should be a number." ], "challengeEntryPoint": "findLongestWord('The quick brown fox jumped over the lazy dog');", "challengeSeed": "function findLongestWord(str) {n  return str.length;rn}", "tests": [ "expect(findLongestWord('The quick brown fox jumped over the lazy dog')).to.be.a('Number');", "expect(findLongestWord('The quick brown fox jumped over the lazy dog')).to.equal(6);", "expect(findLongestWord('May the force be with you')).to.equal(5);", "expect(findLongestWord('Google do a barrel roll')).to.equal(6);", "expect(findLongestWord('What is the average airspeed velocity of an unladen swallow')).to.equal(8);" ] }, { "_id": "a3566b1109230028080c9345", "name": "Sum All Numbers in a Range", "difficulty": "2", "description": [ "We'll pass you an array of two numbers. Return the sum those two numbers and all numbers between them.", "The lowest number will not always come first." ], "challengeEntryPoint": "sumAll([1, 4]);", "challengeSeed": "function sumAll(arr) {n  return(1);rn}", "tests": [ "expect(sumAll([1, 4])).to.be.a('Number');", "expect(sumAll([1, 4])).to.equal(10);", "expect(sumAll([4, 1])).to.equal(10);", "expect(sumAll([5, 10])).to.equal(45);", "expect(sumAll([10, 5])).to.equal(45);" ] }, { "_id": "ab6137d4e35944e21037b769", "name": "Title Case a Sentence", "difficulty": "1", "description": [ "Return the provided string with the first letter of each word capitalized.", "For the purpose of this exercise, you should also capitalize connecting words like 'the' and 'of'." ], "challengeEntryPoint": "titleCase("I'm a little tea pot")", "challengeSeed": "function titleCase(str) {n  return str;rn}", "tests": [ "expect(titleCase("I'm a little tea pot")).to.be.a('String');", "expect(titleCase("I'm a little tea pot")).to.equal("I'm A Little Tea Pot");", "expect(titleCase("sHoRt AnD sToUt")).to.equal("Short And Stout");", "expect(titleCase("HERE IS MY  HANDLE HERE IS MY SPOUT")).to.equal("Here Is My  Handle Here Is My Spout");" </del> <ins> "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');", "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);", "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);", "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair pin'], [5, 'Microphone']]);", "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]);", "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [1, 'Dirty Sock'], [1, 'Hair pin'], [1, 'Half-Eaten Apple'], [1, 'Microphone'], [1, 'Toothpaste']]);" </ins> ] } ]