diff --git a/seed_data/challenges/bonfires.json b/seed_data/challenges/bonfires.json index 73a9827702..fcbe1ecac6 100644 --- a/seed_data/challenges/bonfires.json +++ b/seed_data/challenges/bonfires.json @@ -434,10 +434,12 @@ "", "where([40, 60], 50);" ], + "MDNlinks" : ["Array.sort()"], "tests": [ "expect(where([10, 20, 30, 40, 50], 35)).to.equal(3);", "expect(where([10, 20, 30, 40, 50], 30)).to.equal(2);" - ] + ], + "challengeType": 5 }, { "_id": "a3566b1109230028080c9345", @@ -490,7 +492,10 @@ "assert.deepEqual(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], 'arrays with numbers');", "assert.includeMembers(diff([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), ['piglet', 4], 'arrays with numbers and strings');", "assert.deepEqual(diff([], ['snuffleupagus', 'cookie monster', 'elmo']), ['snuffleupagus', 'cookie monster', 'elmo'], 'empty array');" - ] + ], + "MDNlinks" : ["Comparison Operators", "String.slice()", "Array.filter()", "Array.indexOf()", "String.concat()"], + "challengeType": 5 + }, { "_id": "a7f4d8f2483413a6ce226cac", @@ -504,7 +509,7 @@ ], "difficulty": "2.02", "description": [ - "Convert the number be a roman numeral.", + "Convert the given number into a roman numeral.", "All roman numerals answers should be provided in upper-case.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], @@ -676,6 +681,7 @@ "assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');", "assert.deepEqual(unite([1, 3, 2], [1, [5]], [2, [4]]), [1, 3, 2, [5], [4]], 'should not flatten nested arrays');" ], + "MDNlinks" : ["Array.reduce()"], "challengeType": 5 }, { @@ -777,6 +783,7 @@ "expect(sumPrimes(10)).to.equal(17);", "expect(sumPrimes(977)).to.equal(73156);" ], + "MDNlinks" : ["For Loops", "Array.push()"], "challengeType": 5 }, { @@ -802,6 +809,7 @@ "expect(smallestCommons([5,1])).to.equal(60);", "(smallestCommons([1,13])).should.equal(360360);" ], + "MDNlinks" : ["Smallest Common Multiple"], "challengeType": 5 }, { @@ -824,7 +832,8 @@ "assert.strictEqual(find([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; }), 8, 'should return first found value');", "assert.strictEqual(find([1, 3, 5, 9], function(num) { return num % 2 === 0; }), undefined, 'should return undefined if not found');" ], - "MDNlinks": ["Array.some()"] + "MDNlinks": ["Array.some()"], + "challengeType": 5 }, { "_id": "a5deed1811a43193f9f1c841", @@ -898,32 +907,6 @@ ], "challengeType": 5 }, - { - "_id" : "a3f503de51cfab748ff001aa", - "name": "Pairwise", - "difficulty": "2.16", - "description": [ - "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", - "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.", - "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function pairwise(arr, arg) {", - " return arg;", - "}", - "", - "pairwise([1,4,2,3,0,5], 7);" - ], - "tests": [ - "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);", - "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);", - "expect(pairwise([1,1,1], 2)).to.equal(1);", - "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);", - "expect(pairwise([], 100)).to.equal(0);" - ], - "challengeType": 5 - }, { "_id": "a10d2431ad0c6a099a4b8b52", "name": "Everything Be True", @@ -1042,6 +1025,33 @@ "MDNlinks": ["Math.pow()"], "challengeType": 5 }, + { + "_id" : "a3f503de51cfab748ff001aa", + "name": "Pairwise", + "difficulty": "3.51", + "description": [ + "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", + "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.", + "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function pairwise(arr, arg) {", + " return arg;", + "}", + "", + "pairwise([1,4,2,3,0,5], 7);" + ], + "tests": [ + "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);", + "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);", + "expect(pairwise([1,1,1], 2)).to.equal(1);", + "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);", + "expect(pairwise([], 100)).to.equal(0);" + ], + "MDNlinks" : ["Array.reduce()"], + "challengeType": 5 + }, { "_id": "aff0395860f5d3034dc0bfc9", "name": "Validate US Telephone Numbers", @@ -1087,6 +1097,7 @@ "", "telephoneCheck(\"555-555-5555\");" ], + "MDNlinks" : ["RegExp"], "challengeType": 5 }, { @@ -1110,7 +1121,9 @@ "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');", "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');", "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');" - ] + ], + "MDNlinks" : ["Array.reduce()"], + "challengeType": 5 }, { "_id": "aa2e6f85cab2ab736c9a9b24", @@ -1149,6 +1162,7 @@ "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');" ], + "MDNlinks" : ["Global Object"], "challengeType": 5 }, { @@ -1190,6 +1204,7 @@ "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']]);" ], + "MDNlinks" : ["Global Array Object"], "challengeType": 5 }, { @@ -1217,6 +1232,7 @@ "expect(permAlone('abfdefa')).to.equal(2640);", "expect(permAlone('zzzzzzzz')).to.equal(0);" ], + "MDNlinks" : ["Permutations", "RegExp"], "challengeType": 5 }, { diff --git a/views/coursewares/showBonfire.jade b/views/coursewares/showBonfire.jade index e0e2f89502..e68b9d4115 100644 --- a/views/coursewares/showBonfire.jade +++ b/views/coursewares/showBonfire.jade @@ -92,7 +92,6 @@ block content i.fa.fa-bug |   Bug .button-spacer - br form.code .form-group.codeMirrorView textarea#codeOutput(style='display: none;')