From 144ae3bef2be969243f46d8400afcb6d3a3ab58c Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 28 Sep 2015 19:55:58 -0700 Subject: [PATCH] add messages to basic and advanced bonfires --- challenges/advanced-bonfires.json | 104 ++++++++++----------- challenges/basic-bonfires.json | 146 +++++++++++++++--------------- 2 files changed, 125 insertions(+), 125 deletions(-) diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index 04ff5d7f5e..b186b9290d 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -19,28 +19,28 @@ "Remember to use Read-Search-Ask if you get stuck. Try to pair program. Write your own code." ], "tests": [ - "assert.isBoolean(telephoneCheck(\"555-555-5555\") === 'should return a boolean.');", - "assert(telephoneCheck(\"1 555-555-5555\") === true, '1 555-555-5555 should return true.');", - "assert(telephoneCheck(\"1 (555) 555-5555\") === true, '1 (555) 555-5555 should return true.');", - "assert(telephoneCheck(\"5555555555\") === true, '5555555555 should return true.');", - "assert(telephoneCheck(\"555-555-5555\") === true, '555-555-5555 should return true.');", - "assert(telephoneCheck(\"(555)555-5555\") === true, '(555)555-5555 should return true.');", - "assert(telephoneCheck(\"1(555)555-5555\") === true, '1(555)555-5555 should return true.');", - "assert(telephoneCheck(\"1 555 555 5555\") === true, '1 555 555 5555 should return true.');", - "assert(telephoneCheck(\"555-555-5555\") === true, '555-555-5555 should return true.');", - "assert(telephoneCheck(\"1 456 789 4444\") === true, '1 456 789 4444 should return true.');", - "assert(telephoneCheck(\"123**&!!asdf#\") === false, '123**&!!asdf# should return false.');", - "assert(telephoneCheck(\"55555555\") === false, '55555555 should return false.');", - "assert(telephoneCheck(\"(6505552368)\") === false, '(6505552368) should return false');", - "assert(telephoneCheck(\"2 (757) 622-7382\") === false, '2 (757) 622-7382 should return false.');", - "assert(telephoneCheck(\"0 (757) 622-7382\") === false, '0 (757) 622-7382 should return false.');", - "assert(telephoneCheck(\"-1 (757) 622-7382\") === false, '-1 (757) 622-7382 should return false');", - "assert(telephoneCheck(\"2 757 622-7382\") === false, '2 757 622-7382 should return false.');", - "assert(telephoneCheck(\"10 (757) 622-7382\") === false, '10 (757) 622-7382 should return false.');", - "assert(telephoneCheck(\"27576227382\") === false, '27576227382 should return false.');", - "assert(telephoneCheck(\"(275)76227382\") === false, '(275)76227382 should return false.');", - "assert(telephoneCheck(\"2(757)6227382\") === false, '2(757)6227382 should return false.');", - "assert(telephoneCheck(\"2(757)622-7382\") === false, '2(757)622-7382 should return false.');" + "assert.isBoolean(telephoneCheck(\"555-555-5555\"), 'message: should return a boolean.');", + "assert(telephoneCheck(\"1 555-555-5555\") === true, 'message: 1 555-555-5555 should return true.');", + "assert(telephoneCheck(\"1 (555) 555-5555\") === true, 'message: 1 (555) 555-5555 should return true.');", + "assert(telephoneCheck(\"5555555555\") === true, 'message: 5555555555 should return true.');", + "assert(telephoneCheck(\"555-555-5555\") === true, 'message: 555-555-5555 should return true.');", + "assert(telephoneCheck(\"(555)555-5555\") === true, 'message: (555)555-5555 should return true.');", + "assert(telephoneCheck(\"1(555)555-5555\") === true, 'message: 1(555)555-5555 should return true.');", + "assert(telephoneCheck(\"1 555 555 5555\") === true, 'message: 1 555 555 5555 should return true.');", + "assert(telephoneCheck(\"555-555-5555\") === true, 'message: 555-555-5555 should return true.');", + "assert(telephoneCheck(\"1 456 789 4444\") === true, 'message: 1 456 789 4444 should return true.');", + "assert(telephoneCheck(\"123**&!!asdf#\") === false, 'message: 123**&!!asdf# should return false.');", + "assert(telephoneCheck(\"55555555\") === false, 'message: 55555555 should return false.');", + "assert(telephoneCheck(\"(6505552368)\") === false, 'message: (6505552368) should return false');", + "assert(telephoneCheck(\"2 (757) 622-7382\") === false, 'message: 2 (757) 622-7382 should return false.');", + "assert(telephoneCheck(\"0 (757) 622-7382\") === false, 'message: 0 (757) 622-7382 should return false.');", + "assert(telephoneCheck(\"-1 (757) 622-7382\") === false, 'message: -1 (757) 622-7382 should return false');", + "assert(telephoneCheck(\"2 757 622-7382\") === false, 'message: 2 757 622-7382 should return false.');", + "assert(telephoneCheck(\"10 (757) 622-7382\") === false, 'message: 10 (757) 622-7382 should return false.');", + "assert(telephoneCheck(\"27576227382\") === false, 'message: 27576227382 should return false.');", + "assert(telephoneCheck(\"(275)76227382\") === false, 'message: (275)76227382 should return false.');", + "assert(telephoneCheck(\"2(757)6227382\") === false, 'message: 2(757)6227382 should return false.');", + "assert(telephoneCheck(\"2(757)622-7382\") === false, 'message: 2(757)622-7382 should return false.');" ], "challengeSeed": [ "function telephoneCheck(str) {", @@ -85,10 +85,10 @@ "sym([1, 2, 3], [5, 2, 1, 4]);" ], "tests": [ - "assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4]), [3, 5, 4], '[1, 2, 3], [5, 2, 1, 4] should return [3, 5, 4].');", - "assert.sameMembers(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], '[1, 2, 5], [2, 3, 5], [3, 4, 5] should return [1, 4, 5]');", - "assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], '[1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5] should return [1, 4, 5].');", - "assert.sameMembers(sym([1, 1]), [1], '[1, 1] should return [1].');" + "assert.sameMembers(sym([1, 2, 3], [5, 2, 1, 4]), [3, 5, 4], 'message: [1, 2, 3], [5, 2, 1, 4] should return [3, 5, 4].');", + "assert.sameMembers(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'message: [1, 2, 5], [2, 3, 5], [3, 4, 5] should return [1, 4, 5]');", + "assert.sameMembers(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'message: [1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5] should return [1, 4, 5].');", + "assert.sameMembers(sym([1, 1]), [1], 'message: [1, 1] should return [1].');" ], "MDNlinks": [ "Array.reduce()", @@ -139,13 +139,13 @@ "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);" ], "tests": [ - "assert.isArray(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), 'should return an array.');", - "assert.isString(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'should return a string.');", - "assert.isString(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'should return a string.');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');", - "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');" + "assert.isArray(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), 'message: 19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]] should return an array.');", + "assert.isString(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'message: 19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]] should return a string.');", + "assert.isString(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'message: 19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]] should return a string.');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'message: 19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]) should return [['QUARTER', 0.50]].');", + "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04]], 'message: 3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]] should return [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04]].');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'message: 19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]] should return \"Insufficient Funds\".');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'message: 19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]] should return \"Closed\".');" ], "MDNlinks": [ "Global Object" @@ -195,12 +195,12 @@ "inventory(curInv, newInv);" ], "tests": [ - "assert.isArray(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), 'should return an 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, 'should return an array with a length of 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']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [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'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);" + "assert.isArray(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), 'message: inventory() should return an 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, 'message: 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 should return an array with a length of 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']], 'message: [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']] should return [[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']], 'message: [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [] should return [[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']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']], 'message: [], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']] should return [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [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'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']], 'message: [[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']] should return [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']].');" ], "MDNlinks": [ "Global Array Object" @@ -235,13 +235,13 @@ "permAlone('aab');" ], "tests": [ - "assert.isNumber(permAlone('aab'), 'aab should return a number.');", - "assert.strictEqual(permAlone('aab'), 2, 'aab should return 2.');", - "assert.strictEqual(permAlone('aaa'), 0, 'aaa should return 0.');", - "assert.strictEqual(permAlone('aabb'), 8, 'aabb should return 8.');", - "assert.strictEqual(permAlone('abcdefa'), 3600, 'abcdefa should return 3600.');", - "assert.strictEqual(permAlone('abfdefa'), 2640, 'abfdefa should return 2640.');", - "assert.strictEqual(permAlone('zzzzzzzz'), 0, 'zzzzzzzz should return 0.');" + "assert.isNumber(permAlone('aab'), 'message: aab should return a number.');", + "assert.strictEqual(permAlone('aab'), 2, 'message: aab should return 2.');", + "assert.strictEqual(permAlone('aaa'), 0, 'message: aaa should return 0.');", + "assert.strictEqual(permAlone('aabb'), 8, 'message: aabb should return 8.');", + "assert.strictEqual(permAlone('abcdefa'), 3600, 'message: abcdefa should return 3600.');", + "assert.strictEqual(permAlone('abfdefa'), 2640, 'message: abfdefa should return 2640.');", + "assert.strictEqual(permAlone('zzzzzzzz'), 0, 'message: zzzzzzzz should return 0.');" ], "MDNlinks": [ "Permutations", @@ -281,12 +281,12 @@ "friendly(['2015-07-01', '2015-07-04']);" ], "tests": [ - "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], '[\"2015-07-01\", \"2015-07-04\"] should return [\"July 1st\",\"4th\"].');", - "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], '[\"2015-12-01\", \"2016-02-03\"] should return [\"December 1st\",\"February 3rd\"].');", - "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017'], '[\"2015-12-01\", \"2017-02-03\"] should return [\"December 1st, 2015\",\"February 3rd, 2017\"].');", - "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], '[\"2016-03-01\", \"2016-05-05\"] should return [\"March 1st\",\"May 5th\"]');", - "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], '[\"2017-01-01\", \"2017-01-01\"] should return [\"January 1st, 2017\"].');", - "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023'], '[\"2022-09-05\", \"2023-09-04\"] should return [\"September 5th, 2022\",\"September 4th, 2023\"].');" + "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'message: [\"2015-07-01\", \"2015-07-04\"] should return [\"July 1st\",\"4th\"].');", + "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'message: [\"2015-12-01\", \"2016-02-03\"] should return [\"December 1st\",\"February 3rd\"].');", + "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017'], 'message: [\"2015-12-01\", \"2017-02-03\"] should return [\"December 1st, 2015\",\"February 3rd, 2017\"].');", + "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'message: [\"2016-03-01\", \"2016-05-05\"] should return [\"March 1st\",\"May 5th\"]');", + "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'message: [\"2017-01-01\", \"2017-01-01\"] should return [\"January 1st, 2017\"].');", + "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023'], 'message: [\"2022-09-05\", \"2023-09-04\"] should return [\"September 5th, 2022\",\"September 4th, 2023\"].');" ], "MDNlinks": [ "String.split()", diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index e05978194a..f94842ebaa 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -13,8 +13,8 @@ "Make this function return true no matter what." ], "tests": [ - "assert(typeof(meetBonfire()) === \"boolean\", 'The result should be a Boolean value of true or false.');", - "assert(meetBonfire() === true, 'Your meetBonfire() function should return true.');" + "assert(typeof(meetBonfire()) === \"boolean\", 'message: The result should be a Boolean value of true or false.');", + "assert(meetBonfire() === true, 'message: Your meetBonfire() function should return true.');" ], "challengeSeed": [ "function meetBonfire(argument) {", @@ -46,10 +46,10 @@ "title": "Reverse a String", "difficulty": "1.01", "tests": [ - "assert(typeof(reverseString(\"hello\")) === \"string\", 'reverseString() should return a string.');", - "assert(reverseString(\"hello\") === \"olleh\", '\"hello\" should become \"olleh\".');", - "assert(reverseString(\"Howdy\") === \"ydwoH\", '\"Howdy\" should become \"ydwoH\".');", - "assert(reverseString(\"Greetings from Earth\") === \"htraE morf sgniteerG\", '\"Greetings from Earth\" should return \"htraE morf sgniteerG\".');" + "assert(typeof(reverseString(\"hello\")) === \"string\", 'message: reverseString() should return a string.');", + "assert(reverseString(\"hello\") === \"olleh\", 'message: \"hello\" should become \"olleh\".');", + "assert(reverseString(\"Howdy\") === \"ydwoH\", 'message: \"Howdy\" should become \"ydwoH\".');", + "assert(reverseString(\"Greetings from Earth\") === \"htraE morf sgniteerG\", 'message: \"Greetings from Earth\" should return \"htraE morf sgniteerG\".');" ], "description": [ "Reverse the provided string.", @@ -87,11 +87,11 @@ "id": "a302f7aae1aa3152a5b413bc", "title": "Factorialize a Number", "tests": [ - "assert(typeof(factorialize(5)) === \"number\", 'factorialize() should return a number.');", - "assert(factorialize(5) === 120, '5 should return 120.');", - "assert(factorialize(10) === 3628800, '10 should return 3,628,800.');", - "assert(factorialize(20) === 2432902008176640000, '20 should return 2,432,902,008,176,640,000.');", - "assert(factorialize(0) === 1, '0 should return 1.');" + "assert(typeof(factorialize(5)) === \"number\", 'message: factorialize() should return a number.');", + "assert(factorialize(5) === 120, 'message: 5 should return 120.');", + "assert(factorialize(10) === 3628800, 'message: 10 should return 3,628,800.');", + "assert(factorialize(20) === 2432902008176640000, 'message: 20 should return 2,432,902,008,176,640,000.');", + "assert(factorialize(0) === 1, 'message: 0 should return 1.');" ], "difficulty": "1.02", "description": [ @@ -136,17 +136,17 @@ "Remember to use Read-Search-Ask if you get stuck. Write your own code." ], "tests": [ - "assert(typeof(palindrome(\"eye\")) === \"boolean\", 'palindrome() should return a boolean.');", - "assert(palindrome(\"eye\") === true, '\"eye\" should return true.');", - "assert(palindrome(\"race car\") === true, '\"race car\" should return true.');", - "assert(palindrome(\"not a palindrome\") === false, '\"not a palindrome\" should return false.');", - "assert(palindrome(\"A man, a plan, a canal. Panama\") === true, '\"A man, a plan, a canal. Panama\" should return true.');", - "assert(palindrome(\"never odd or even\") === true, '\"never odd or even\" should return true.');", - "assert(palindrome(\"nope\") === false, '\"nope\" should return false.');", - "assert(palindrome(\"almostomla\") === false, '\"almostomla\" should return false.');", - "assert(palindrome(\"My age is 0, 0 si ega ym.\") === true, '\"My age is 0, 0 si ega ym.\" should return true.');", - "assert(palindrome(\"1 eye for of 1 eye.\") === false, '\"1 eye for of 1 eye.\" should return false.');", - "assert(palindrome(\"0_0 (: /-\\ :) 0-0\") === true, '\"0_0 (: /-\\\\ :) 0-0\" should return true.');" + "assert(typeof(palindrome(\"eye\")) === \"boolean\", 'message: palindrome() should return a boolean.');", + "assert(palindrome(\"eye\") === true, 'message: \"eye\" should return true.');", + "assert(palindrome(\"race car\") === true, 'message: \"race car\" should return true.');", + "assert(palindrome(\"not a palindrome\") === false, 'message: \"not a palindrome\" should return false.');", + "assert(palindrome(\"A man, a plan, a canal. Panama\") === true, 'message: \"A man, a plan, a canal. Panama\" should return true.');", + "assert(palindrome(\"never odd or even\") === true, 'message: \"never odd or even\" should return true.');", + "assert(palindrome(\"nope\") === false, 'message: \"nope\" should return false.');", + "assert(palindrome(\"almostomla\") === false, 'message: \"almostomla\" should return false.');", + "assert(palindrome(\"My age is 0, 0 si ega ym.\") === true, 'message: \"My age is 0, 0 si ega ym.\" should return true.');", + "assert(palindrome(\"1 eye for of 1 eye.\") === false, 'message: \"1 eye for of 1 eye.\" should return false.');", + "assert(palindrome(\"0_0 (: /-\\ :) 0-0\") === true, 'message: \"0_0 (: /-\\\\ :) 0-0\" should return true.');" ], "challengeSeed": [ "function palindrome(str) {", @@ -192,12 +192,12 @@ "findLongestWord(\"The quick brown fox jumped over the lazy dog\");" ], "tests": [ - "assert(typeof(findLongestWord(\"The quick brown fox jumped over the lazy dog\")) === \"number\", 'findLongestWord() should return a number.');", - "assert(findLongestWord(\"The quick brown fox jumped over the lazy dog\") === 6, '\"The quick brown fox jumped over the lazy dog\" should return 6.');", - "assert(findLongestWord(\"May the force be with you\") === 5, '\"May the force be with you\" should return 5.');", - "assert(findLongestWord(\"Google do a barrel roll\") === 6, '\"Google do a barrel roll\" should return 6.');", - "assert(findLongestWord(\"What is the average airspeed velocity of an unladen swallow\") === 8, '\"What is the average airspeed velocity of an unladen swallow\" should return 8.');", - "assert(findLongestWord(\"What if we try a super-long word such as otorhinolaryngology\") === 19, '\"What if we try a super-long word such as otorhinolaryngology\" should return 19.');" + "assert(typeof(findLongestWord(\"The quick brown fox jumped over the lazy dog\")) === \"number\", 'message: findLongestWord() should return a number.');", + "assert(findLongestWord(\"The quick brown fox jumped over the lazy dog\") === 6, 'message: \"The quick brown fox jumped over the lazy dog\" should return 6.');", + "assert(findLongestWord(\"May the force be with you\") === 5, 'message: \"May the force be with you\" should return 5.');", + "assert(findLongestWord(\"Google do a barrel roll\") === 6, 'message: \"Google do a barrel roll\" should return 6.');", + "assert(findLongestWord(\"What is the average airspeed velocity of an unladen swallow\") === 8, 'message: \"What is the average airspeed velocity of an unladen swallow\" should return 8.');", + "assert(findLongestWord(\"What if we try a super-long word such as otorhinolaryngology\") === 19, 'message: \"What if we try a super-long word such as otorhinolaryngology\" should return 19.');" ], "MDNlinks": [ "String.split()", @@ -233,10 +233,10 @@ "titleCase(\"I'm a little tea pot\", \"\");" ], "tests": [ - "assert(typeof(titleCase(\"I'm a little tea pot\")) === \"string\", 'titleCase() should return a string.');", - "assert(titleCase(\"I'm a little tea pot\") === \"I'm A Little Tea Pot\", '\"I'm a little tea pot\" should return \"I'm A Little Tea Pot\".');", - "assert(titleCase(\"sHoRt AnD sToUt\") === \"Short And Stout\", '\"sHoRt AnD sToUt\" should return \"Short And Stout\".');", - "assert(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\") === \"Here Is My Handle Here Is My Spout\", '\"HERE IS MY HANDLE HERE IS MY SPOUT\" should return \"Here Is My Handle Here Is My Spout\"');" + "assert(typeof(titleCase(\"I'm a little tea pot\")) === \"string\", 'message: titleCase() should return a string.');", + "assert(titleCase(\"I'm a little tea pot\") === \"I'm A Little Tea Pot\", 'message: \"I'm a little tea pot\" should return \"I'm A Little Tea Pot\".');", + "assert(titleCase(\"sHoRt AnD sToUt\") === \"Short And Stout\", 'message: \"sHoRt AnD sToUt\" should return \"Short And Stout\".');", + "assert(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\") === \"Here Is My Handle Here Is My Spout\", 'message: \"HERE IS MY HANDLE HERE IS MY SPOUT\" should return \"Here Is My Handle Here Is My Spout\"');" ], "MDNlinks": [ "String.charAt()" @@ -311,11 +311,11 @@ "end(\"Bastian\", \"n\", \"\");" ], "tests": [ - "assert(end(\"Bastian\", \"n\") === true, '\"Bastian\", \"n\" should return true.');", - "assert(end(\"Connor\", \"n\") === false, '\"Connor\", \"n\" should return false.');", - "assert(end(\"Walking on water and developing software from a specification are easy if both are frozen.\", \"specification\") === false, '\"Walking on water and developing software from a specification are easy if both are frozen.\", \"specification\") should return false.');", - "assert(end(\"He has to give me a new name\", \"name\") === true, '\"He has to give me a new name\", \"name\" should return true.');", - "assert(end(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") === false, '\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\" should return false.');" + "assert(end(\"Bastian\", \"n\") === true, 'message: \"Bastian\", \"n\" should return true.');", + "assert(end(\"Connor\", \"n\") === false, 'message: \"Connor\", \"n\" should return false.');", + "assert(end(\"Walking on water and developing software from a specification are easy if both are frozen.\", \"specification\") === false, 'message: \"Walking on water and developing software from a specification are easy if both are frozen.\", \"specification\") should return false.');", + "assert(end(\"He has to give me a new name\", \"name\") === true, 'message: \"He has to give me a new name\", \"name\" should return true.');", + "assert(end(\"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\") === false, 'message: \"If you want to save our world, you must hurry. We dont know how much longer we can withstand the nothing\", \"mountain\" should return false.');" ], "MDNlinks": [ "String.substr()" @@ -350,9 +350,9 @@ "repeat(\"abc\", 3, \"\");" ], "tests": [ - "assert(repeat(\"*\", 3) === \"***\", '\"*\", 3 should return \"***\".');", - "assert(repeat(\"abc\", 3) === \"abcabcabc\", '\"abc\", 3 should return \"abcabcabc\".');", - "assert(repeat(\"abc\", -2) === \"\", '\"abc\", -2 should return \"\".');" + "assert(repeat(\"*\", 3) === \"***\", 'message: \"*\", 3 should return \"***\".');", + "assert(repeat(\"abc\", 3) === \"abcabcabc\", 'message: \"abc\", 3 should return \"abcabcabc\".');", + "assert(repeat(\"abc\", -2) === \"\", 'message: \"abc\", -2 should return \"\".');" ], "MDNlinks": [ "Global String Object" @@ -388,10 +388,10 @@ "truncate(\"A-tisket a-tasket A green and yellow basket\", 11, \"\");" ], "tests": [ - "assert(truncate(\"A-tisket a-tasket A green and yellow basket\", 11) === \"A-tisket...\", '\"A-tisket a-tasket A green and yellow basket\", 1 should return \"A-tisket...\".');", - "assert(truncate(\"Peter Piper picked a peck of pickled peppers\", 14) === \"Peter Piper...\", '\"Peter Piper picked a peck of pickled peppers\", 14 should return \"Peter Piper...\".');", - "assert(truncate(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length) === \"A-tisket a-tasket A green and yellow basket\", '\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length) should return \"A-tisket a-tasket A green and yellow basket\".');", - "assert(truncate('A-tisket a-tasket A green and yellow basket', 'A-tisket a-tasket A green and yellow basket'.length + 2) === 'A-tisket a-tasket A green and yellow basket', '\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length + 2 should return \"A-tisket a-tasket A green and yellow basket\".');" + "assert(truncate(\"A-tisket a-tasket A green and yellow basket\", 11) === \"A-tisket...\", 'message: \"A-tisket a-tasket A green and yellow basket\", 1 should return \"A-tisket...\".');", + "assert(truncate(\"Peter Piper picked a peck of pickled peppers\", 14) === \"Peter Piper...\", 'message: \"Peter Piper picked a peck of pickled peppers\", 14 should return \"Peter Piper...\".');", + "assert(truncate(\"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length) === \"A-tisket a-tasket A green and yellow basket\", 'message: \"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length) should return \"A-tisket a-tasket A green and yellow basket\".');", + "assert(truncate('A-tisket a-tasket A green and yellow basket', 'A-tisket a-tasket A green and yellow basket'.length + 2) === 'A-tisket a-tasket A green and yellow basket', 'message: \"A-tisket a-tasket A green and yellow basket\", \"A-tisket a-tasket A green and yellow basket\".length + 2 should return \"A-tisket a-tasket A green and yellow basket\".');" ], "MDNlinks": [ "String.slice()" @@ -426,10 +426,10 @@ "chunk([\"a\", \"b\", \"c\", \"d\"], 2, \"\");" ], "tests": [ - "assert.deepEqual(chunk([\"a\", \"b\", \"c\", \"d\"], 2), [[\"a\", \"b\"], [\"c\", \"d\"]], '[\"a\", \"b\", \"c\", \"d\"], 2 should return [[\"a\", \"b\"], [\"c\", \"d\"]].');", - "assert.deepEqual(chunk([0, 1, 2, 3, 4, 5], 3), [[0, 1, 2], [3, 4, 5]], '[0, 1, 2, 3, 4, 5] should return [[0, 1, 2], [3, 4, 5]].');", - "assert.deepEqual(chunk([0, 1, 2, 3, 4, 5], 2), [[0, 1], [2, 3], [4, 5]], '[0, 1, 2, 3, 4, 5], 2 should return [[0, 1], [2, 3], [4, 5]].');", - "assert.deepEqual(chunk([0, 1, 2, 3, 4, 5], 4), [[0, 1, 2, 3], [4, 5]], '[0, 1, 2, 3, 4, 5], 4 should return [[0, 1, 2, 3], [4, 5]].');" + "assert.deepEqual(chunk([\"a\", \"b\", \"c\", \"d\"], 2), [[\"a\", \"b\"], [\"c\", \"d\"]], 'message: [\"a\", \"b\", \"c\", \"d\"], 2 should return [[\"a\", \"b\"], [\"c\", \"d\"]].');", + "assert.deepEqual(chunk([0, 1, 2, 3, 4, 5], 3), [[0, 1, 2], [3, 4, 5]], 'message: [0, 1, 2, 3, 4, 5] should return [[0, 1, 2], [3, 4, 5]].');", + "assert.deepEqual(chunk([0, 1, 2, 3, 4, 5], 2), [[0, 1], [2, 3], [4, 5]], 'message: [0, 1, 2, 3, 4, 5], 2 should return [[0, 1], [2, 3], [4, 5]].');", + "assert.deepEqual(chunk([0, 1, 2, 3, 4, 5], 4), [[0, 1, 2, 3], [4, 5]], 'message: [0, 1, 2, 3, 4, 5], 4 should return [[0, 1, 2, 3], [4, 5]].');" ], "MDNlinks": [ "Array.push()" @@ -464,9 +464,9 @@ "slasher([1, 2, 3], 2, \"\");" ], "tests": [ - "assert.deepEqual(slasher([1, 2, 3], 2), [3], '[1, 2, 3], 2, [3] should return [3].');", - "assert.deepEqual(slasher([1, 2, 3], 0), [1, 2, 3], '[1, 2, 3], 0 should return [1, 2, 3].');", - "assert.deepEqual(slasher([1, 2, 3], 9), [], '[1, 2, 3], 9 should return [].');" + "assert.deepEqual(slasher([1, 2, 3], 2), [3], 'message: [1, 2, 3], 2, [3] should return [3].');", + "assert.deepEqual(slasher([1, 2, 3], 0), [1, 2, 3], 'message: [1, 2, 3], 0 should return [1, 2, 3].');", + "assert.deepEqual(slasher([1, 2, 3], 9), [], 'message: [1, 2, 3], 9 should return [].');" ], "MDNlinks": [ "Array.slice()", @@ -504,14 +504,14 @@ "mutation([\"hello\", \"hey\"], \"\");" ], "tests": [ - "assert(mutation([\"hello\", \"hey\"]) === false, '[\"hello\", \"hey\"] should return false.');", - "assert(mutation([\"hello\", \"Hello\"]) === true, '[\"hello\", \"Hello\"] should return true.');", - "assert(mutation([\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"]) === true, '[\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"] should return true.');", - "assert(mutation([\"Mary\", \"Army\"]) === true, '[\"Mary\", \"Army\"] should return true.');", - "assert(mutation([\"Mary\", \"Aarmy\"]) === true, '[\"Mary\", \"Aarmy\"] should return true.');", - "assert(mutation([\"Alien\", \"line\"]) === true, '[\"Alien\", \"line\"] should return true.');", - "assert(mutation([\"floor\", \"for\"]) === true, '[\"floor\", \"for\"] should return true.');", - "assert(mutation([\"hello\", \"neo\"]) === false, '[\"hello\", \"neo\"] should return false.');" + "assert(mutation([\"hello\", \"hey\"]) === false, 'message: [\"hello\", \"hey\"] should return false.');", + "assert(mutation([\"hello\", \"Hello\"]) === true, 'message: [\"hello\", \"Hello\"] should return true.');", + "assert(mutation([\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"]) === true, 'message: [\"zyxwvutsrqponmlkjihgfedcba\", \"qrstu\"] should return true.');", + "assert(mutation([\"Mary\", \"Army\"]) === true, 'message: [\"Mary\", \"Army\"] should return true.');", + "assert(mutation([\"Mary\", \"Aarmy\"]) === true, 'message: [\"Mary\", \"Aarmy\"] should return true.');", + "assert(mutation([\"Alien\", \"line\"]) === true, 'message: [\"Alien\", \"line\"] should return true.');", + "assert(mutation([\"floor\", \"for\"]) === true, 'message: [\"floor\", \"for\"] should return true.');", + "assert(mutation([\"hello\", \"neo\"]) === false, 'message: [\"hello\", \"neo\"] should return false.');" ], "MDNlinks": [ "Array.indexOf()" @@ -547,9 +547,9 @@ "bouncer([7, \"ate\", \"\", false, 9], \"\");" ], "tests": [ - "assert.deepEqual(bouncer([7, \"ate\", \"\", false, 9]), [7, \"ate\", 9], '[7, \"ate\", \"\", false, 9] should return [7, \"ate\", 9].');", - "assert.deepEqual(bouncer([\"a\", \"b\", \"c\"]), [\"a\", \"b\", \"c\"], '[\"a\", \"b\", \"c\"] should return [\"a\", \"b\", \"c\"].');", - "assert.deepEqual(bouncer([false, null, 0, NaN, undefined, '']), [], '[false, null, 0] should return [].');" + "assert.deepEqual(bouncer([7, \"ate\", \"\", false, 9]), [7, \"ate\", 9], 'message: [7, \"ate\", \"\", false, 9] should return [7, \"ate\", 9].');", + "assert.deepEqual(bouncer([\"a\", \"b\", \"c\"]), [\"a\", \"b\", \"c\"], 'message: [\"a\", \"b\", \"c\"] should return [\"a\", \"b\", \"c\"].');", + "assert.deepEqual(bouncer([false, null, 0, NaN, undefined, '']), [], 'message: [false, null, 0] should return [].');" ], "MDNlinks": [ "Boolean Objects", @@ -585,11 +585,11 @@ "destroyer([1, 2, 3, 1, 2, 3], 2, 3, \"\");" ], "tests": [ - "assert.deepEqual(destroyer([1, 2, 3, 1, 2, 3], 2, 3), [1, 1], '[1, 2, 3, 1, 2, 3], 2, 3 should return [1, 1].');", - "assert.deepEqual(destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3), [1, 5, 1], '[1, 2, 3, 5, 1, 2, 3], 2, 3 should return [1, 5, 1].');", - "assert.deepEqual(destroyer([3, 5, 1, 2, 2], 2, 3, 5), [1], '[3, 5, 1, 2, 2], 2, 3, 5 should return [1].');", - "assert.deepEqual(destroyer([2, 3, 2, 3], 2, 3), [], '[2, 3, 2, 3], 2, 3 should return [].');", - "assert.deepEqual(destroyer([\"tree\", \"hamburger\", 53], \"tree\", 53), [\"hamburger\"], '[\"tree\", \"hamburger\", 53], \"tree\", 53) should return [\"hamburger\"].');" + "assert.deepEqual(destroyer([1, 2, 3, 1, 2, 3], 2, 3), [1, 1], 'message: [1, 2, 3, 1, 2, 3], 2, 3 should return [1, 1].');", + "assert.deepEqual(destroyer([1, 2, 3, 5, 1, 2, 3], 2, 3), [1, 5, 1], 'message: [1, 2, 3, 5, 1, 2, 3], 2, 3 should return [1, 5, 1].');", + "assert.deepEqual(destroyer([3, 5, 1, 2, 2], 2, 3, 5), [1], 'message: [3, 5, 1, 2, 2], 2, 3, 5 should return [1].');", + "assert.deepEqual(destroyer([2, 3, 2, 3], 2, 3), [], 'message: [2, 3, 2, 3], 2, 3 should return [].');", + "assert.deepEqual(destroyer([\"tree\", \"hamburger\", 53], \"tree\", 53), [\"hamburger\"], 'message: [\"tree\", \"hamburger\", 53], \"tree\", 53) should return [\"hamburger\"].');" ], "MDNlinks": [ "Arguments object", @@ -629,12 +629,12 @@ "Array.sort()" ], "tests": [ - "assert(where([10, 20, 30, 40, 50], 35) === 3, '[10, 20, 30, 40, 50], 35 should return 3.');", - "assert(where([10, 20, 30, 40, 50], 30) === 2, '[10, 20, 30, 40, 50], 30) should return 2.');", - "assert(where([40, 60], 50) === 1, '[40, 60,], 50 should return 1.');", - "assert(where([5, 3, 20, 3], 3) === 0, '[5, 3, 20, 3], 3 should return 0.');", - "assert(where([2, 20, 10], 1) === 0, '[2, 20, 10], 1 should return 0.');", - "assert(where([2, 5, 10], 15) === 3, '[2, 5, 10], 15 should return 3.');" + "assert(where([10, 20, 30, 40, 50], 35) === 3, 'message: [10, 20, 30, 40, 50], 35 should return 3.');", + "assert(where([10, 20, 30, 40, 50], 30) === 2, 'message: [10, 20, 30, 40, 50], 30) should return 2.');", + "assert(where([40, 60], 50) === 1, 'message: [40, 60,], 50 should return 1.');", + "assert(where([5, 3, 20, 3], 3) === 0, 'message: [5, 3, 20, 3], 3 should return 0.');", + "assert(where([2, 20, 10], 1) === 0, 'message: [2, 20, 10], 1 should return 0.');", + "assert(where([2, 5, 10], 15) === 3, 'message: [2, 5, 10], 15 should return 3.');" ], "type": "bonfire", "challengeType": 5,