From 9e415c9b786fbe2b75c471040d663ea46a3d8d0c Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Tue, 29 Sep 2015 14:18:43 -0700 Subject: [PATCH] finish first pass at intermediate bonfires --- challenges/intermediate-bonfires.json | 116 +++++++++++++------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index ef3e7be3f0..85fdf9cb61 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -151,9 +151,9 @@ ], "tests": [ "assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'message: where() should return an array of objects.');", - "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'message: should return .');", - "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'message: should return .');", - "assert.deepEqual(where([{ 'a': 5 }, { 'b': 10 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'message: should return .');" + "assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'message: where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }) should return [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }].');", + "assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'message: where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }) should return [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }].');", + "assert.deepEqual(where([{ 'a': 5 }, { 'b': 10 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'message: where([{ 'a': 5 }, { 'b': 10 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }) should return [{ 'a': 5, 'b': 10 }].');" ], "MDNlinks": [ "Global Object", @@ -265,9 +265,9 @@ "id": "afd15382cdfb22c9efe8b7de", "title": "DNA Pairing", "tests": [ - "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'message: should return .');", - "assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'message: should return .');", - "assert.deepEqual(pair(\"CTCTA\"),[['C','G'],['T','A'],['C','G'],['T','A'],['A','T']], 'message: should return .');" + "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'message: pair(\"ATCGA\") should return [['A','T'],['T','A'],['C','G'],['G','C'],['A','T']].');", + "assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'message: pair(\"TTGAG\") should return [['T','A'],['T','A'],['G','C'],['A','T'],['G','C']].');", + "assert.deepEqual(pair(\"CTCTA\"),[['C','G'],['T','A'],['C','G'],['T','A'],['A','T']], 'message: pair(\"CTCTA\") should return [['C','G'],['T','A'],['C','G'],['T','A'],['A','T']].');" ], "difficulty": "2.05", "description": [ @@ -319,10 +319,10 @@ "fearNotLetter('abce');" ], "tests": [ - "assert.deepEqual(fearNotLetter(\"abce\"), \"d\", 'message: fearNotLetter(\"abce\") should return d');", - "assert.deepEqual(fearNotLetter(\"abcdefghjklmno\"), \"i\", 'message: fearNotLetter(\"abcdefghjklmno\") should return i');", - "assert.isUndefined(fearNotLetter(\"bcd\"), 'message: fearNotLetter(\"bcd\") should return undefined');", - "assert.isUndefined(fearNotLetter(\"yz\"), 'message: fearNotLetter(\"yz\") should return undefined');" + "assert.deepEqual(fearNotLetter(\"abce\"), \"d\", 'message: fearNotLetter(\"abce\") should return \"d\".');", + "assert.deepEqual(fearNotLetter(\"abcdefghjklmno\"), \"i\", 'message: fearNotLetter(\"abcdefghjklmno\") should return \"i\".');", + "assert.isUndefined(fearNotLetter(\"bcd\"), 'message: fearNotLetter(\"bcd\") should return undefined.');", + "assert.isUndefined(fearNotLetter(\"yz\"), 'message: fearNotLetter(\"yz\") should return undefined.');" ], "MDNlinks": [ "String.charCodeAt()", @@ -359,14 +359,14 @@ "boo(null);" ], "tests": [ - "assert.strictEqual(boo(true), true, 'message: should return true.');", - "assert.strictEqual(boo(false), true, 'message: should return true.');", - "assert.strictEqual(boo([1, 2, 3]), false, 'message: should return false.');", - "assert.strictEqual(boo([].slice), false, 'message: should return false.');", - "assert.strictEqual(boo({ 'a': 1 }), false, 'message: should return false.');", - "assert.strictEqual(boo(1), false, 'message: should return false.');", - "assert.strictEqual(boo(NaN), false, 'message: should return true.');", - "assert.strictEqual(boo('a'), false, 'message: should return false.');" + "assert.strictEqual(boo(true), true, 'message: boo(true) should return true.');", + "assert.strictEqual(boo(false), true, 'message: boo(false) should return true.');", + "assert.strictEqual(boo([1, 2, 3]), false, 'message: boo([1, 2, 3]) should return false.');", + "assert.strictEqual(boo([].slice), false, 'message: boo([].slice) should return false.');", + "assert.strictEqual(boo({ 'a': 1 }), false, 'message: boo({ 'a': 1 }) should return false.');", + "assert.strictEqual(boo(1), false, 'message: boo(1) should return false.');", + "assert.strictEqual(boo(NaN), false, 'message: boo(NaN) should return true.');", + "assert.strictEqual(boo('a'), false, 'message: boo('a') should return false.');" ], "MDNlinks": [ "Boolean Objects" @@ -403,10 +403,10 @@ "unite([1, 3, 2], [5, 2, 1, 4], [2, 1]);" ], "tests": [ - "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');", - "assert.deepEqual(unite([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5], 'should correctly handle exactly two arguments');", - "assert.deepEqual(unite([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [ 1, 2, 3, 5, 4, 6, 7, 8 ], 'should correctly handle higher numbers of arguments');" + "assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'message: should return .');", + "assert.deepEqual(unite([1, 3, 2], [1, [5]], [2, [4]]), [1, 3, 2, [5], [4]], 'message: should return .');", + "assert.deepEqual(unite([1, 2, 3], [5, 2, 1]), [1, 2, 3, 5], 'message: should return .');", + "assert.deepEqual(unite([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [ 1, 2, 3, 5, 4, 6, 7, 8 ], 'message: should return .');" ], "MDNlinks": [ "Arguments object", @@ -442,13 +442,13 @@ "convert('Dolce & Gabbana');" ], "tests": [ - "assert.match(convert('Dolce & Gabbana'), /Dolce &(amp|AMP|#x00026|#38); Gabbana/, 'should escape characters');", - "assert.match(convert('Hamburgers < Pizza < Tacos'), /Hamburgers &(lt|LT|#x0003C|#60); Pizza &(lt|LT|#x0003C|#60); Tacos/, 'should escape characters');", - "assert.match(convert('Sixty > twelve'), /Sixty &(gt|GT|#x0003E|#62); twelve/, 'should escape characters');", - "assert.match(convert('Stuff in \"quotation marks\"'), /Stuff in &(quot|QUOT|#x00022|#34);quotation marks&(quot|QUOT|#x00022|#34);/, 'should escape characters');", - "assert.match(convert(\"Shindler's List\"), /Shindler&(apos|#x00027|#39);s List/, 'should escape characters');", - "assert.match(convert('<>'), /&(lt|LT|#x0003C|#60);&(gt|GT|#x0003E|#62);/, 'should escape characters');", - "assert.strictEqual(convert('abc'), 'abc', 'should handle strings with nothing to escape');" + "assert.match(convert('Dolce & Gabbana'), /Dolce &(amp|AMP|#x00026|#38); Gabbana/, 'message: convert('Dolce & Gabbana') should return /Dolce &(amp|AMP|#x00026|#38); Gabbana/.');", + "assert.match(convert('Hamburgers < Pizza < Tacos'), /Hamburgers &(lt|LT|#x0003C|#60); Pizza &(lt|LT|#x0003C|#60); Tacos/, 'message: convert('Hamburgers < Pizza < Tacos') should return /Hamburgers &(lt|LT|#x0003C|#60); Pizza &(lt|LT|#x0003C|#60); Tacos/.');", + "assert.match(convert('Sixty > twelve'), /Sixty &(gt|GT|#x0003E|#62); twelve/, 'message: convert('Sixty > twelve') should return /Sixty &(gt|GT|#x0003E|#62); twelve/.');", + "assert.match(convert('Stuff in \"quotation marks\"'), /Stuff in &(quot|QUOT|#x00022|#34);quotation marks&(quot|QUOT|#x00022|#34);/, 'message: convert('Stuff in \"quotation marks\"') should return /Stuff in &(quot|QUOT|#x00022|#34);quotation marks&(quot|QUOT|#x00022|#34);/.');", + "assert.match(convert(\"Shindler's List\"), /Shindler&(apos|#x00027|#39);s List/, 'message: convert(\"Shindler's List\") should return /Shindler&(apos|#x00027|#39);s List/.');", + "assert.match(convert('<>'), /&(lt|LT|#x0003C|#60);&(gt|GT|#x0003E|#62);/, 'message: convert('<>') should return /&(lt|LT|#x0003C|#60);&(gt|GT|#x0003E|#62);/.');", + "assert.strictEqual(convert('abc'), 'abc', 'message: convert(\"abc\") should return \"abc\".');" ], "MDNlinks": [ "RegExp", @@ -485,10 +485,10 @@ "spinalCase('This Is Spinal Tap');" ], "tests": [ - "assert.strictEqual(spinalCase('This Is Spinal Tap'), 'this-is-spinal-tap', 'should return spinal case from string with spaces');", - "assert.strictEqual(spinalCase('thisIsSpinalTap'), 'this-is-spinal-tap', 'should return spinal case from string with camel case');", - "assert.strictEqual(spinalCase('The_Andy_Griffith_Show'), 'the-andy-griffith-show', 'should return spinal case from string with snake case');", - "assert.strictEqual(spinalCase('Teletubbies say Eh-oh'), 'teletubbies-say-eh-oh', 'should return spinal case from string with spaces and hyphens');" + "assert.strictEqual(spinalCase('This Is Spinal Tap'), 'this-is-spinal-tap', 'message: spinalCase('This Is Spinal Tap') should return 'this-is-spinal-tap'.');", + "assert.strictEqual(spinalCase('thisIsSpinalTap'), 'this-is-spinal-tap', 'message: spinalCase('thisIsSpinalTap') should return 'this-is-spinal-tap'.');", + "assert.strictEqual(spinalCase('The_Andy_Griffith_Show'), 'the-andy-griffith-show', 'message: spinalCase('The_Andy_Griffith_Show') should return 'the-andy-griffith-show'.');", + "assert.strictEqual(spinalCase('Teletubbies say Eh-oh'), 'teletubbies-say-eh-oh', 'message: spinalCase('Teletubbies say Eh-oh') should return 'teletubbies-say-eh-oh'.');" ], "MDNlinks": [ "RegExp", @@ -525,7 +525,7 @@ "sumFibs(4);" ], "tests": [ - "assert.deepEqual(typeof(sumFibs(1)), \"number\", \"The result should be a number\");", + "assert.deepEqual(typeof(sumFibs(1)), \"number\", message: sumFibs() should return a number.);", "assert.deepEqual(sumFibs(1000), 1785, 'message: sumFibs(1000) should return 1785');", "assert.deepEqual(sumFibs(4000000), 4613732, 'message: sumFibs(4000000) should return 4613732');", "assert.deepEqual(sumFibs(4), 5, 'message: sumFibs(4) should return 5');", @@ -566,9 +566,9 @@ "sumPrimes(10);" ], "tests": [ - "assert.deepEqual(typeof(sumPrimes(10)), \"number\", \"The result should be a number\");", - "assert.deepEqual(sumPrimes(10), 17, 'message: sumPrimes(10) should return 17');", - "assert.deepEqual(sumPrimes(977), 73156, 'message: sumPrimes(977) should return 73156');" + "assert.deepEqual(typeof(sumPrimes(10)), \"number\", 'message: sumPrimes() should return a number.');", + "assert.deepEqual(sumPrimes(10), 17, 'message: sumPrimes(10) should return 17.');", + "assert.deepEqual(sumPrimes(977), 73156, 'message: sumPrimes(977) should return 73156.');" ], "MDNlinks": [ "For Loops", @@ -606,7 +606,7 @@ "smallestCommons([1,5]);" ], "tests": [ - "assert.deepEqual(typeof(smallestCommons([1, 5])), \"number\", \"The result should be a number\");", + "assert.deepEqual(typeof(smallestCommons([1, 5])), \"number\", 'message: smallestCommons() should return a number.');", "assert.deepEqual(smallestCommons([1, 5]), 60, 'message: smallestCommons([1, 5]) should return 60');", "assert.deepEqual(smallestCommons([5, 1]), 60, 'message: smallestCommons([5, 1]) should return 60');", "assert.deepEqual(smallestCommons([1, 13]), 360360, 'message: smallestCommons([1, 13]) should return 360360');" @@ -644,8 +644,8 @@ "find([1, 2, 3, 4], function(num){ return num % 2 === 0; });" ], "tests": [ - "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');" + "assert.strictEqual(find([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; }), 8, 'message: find([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; }) should return 8.');", + "assert.strictEqual(find([1, 3, 5, 9], function(num) { return num % 2 === 0; }), undefined, 'message: find([1, 3, 5, 9], function(num) { return num % 2 === 0; }) should return undefined.');" ], "MDNlinks": [ "Array.some()" @@ -680,10 +680,10 @@ "drop([1, 2, 3], function(n) {return n < 3; });" ], "tests": [ - "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n>= 3;}), [3, 4], 'message: drop([1, 2, 3, 4], function(n) {return n>= 3;}) should return [3, 4]');", - "assert.deepEqual(drop([1, 2, 3], function(n) {return n > 0; }), [1, 2, 3], 'message: drop([1, 2, 3], function(n) {return n > 0; }) should return [1, 2, 3]');", - "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n > 5;}), [], 'message: drop([1, 2, 3, 4], function(n) {return n > 5;}) should return []');", - "assert.deepEqual(drop([1, 2, 3, 7, 4], function(n) {return n > 3}), [7, 4], 'message: drop([1, 2, 3, 7, 4], function(n) {return n>= 3}) should return [7, 4]');" + "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n>= 3;}), [3, 4], 'message: drop([1, 2, 3, 4], function(n) {return n>= 3;}) should return [3, 4].');", + "assert.deepEqual(drop([1, 2, 3], function(n) {return n > 0; }), [1, 2, 3], 'message: drop([1, 2, 3], function(n) {return n > 0; }) should return [1, 2, 3].');", + "assert.deepEqual(drop([1, 2, 3, 4], function(n) {return n > 5;}), [], 'message: drop([1, 2, 3, 4], function(n) {return n > 5;}) should return [].');", + "assert.deepEqual(drop([1, 2, 3, 7, 4], function(n) {return n > 3}), [7, 4], 'message: drop([1, 2, 3, 7, 4], function(n) {return n>= 3}) should return [7, 4].');" ], "MDNlinks": [ "Arguments object", @@ -719,10 +719,10 @@ "steamroller([1, [2], [3, [[4]]]]);" ], "tests": [ - "assert.deepEqual(steamroller([[['a']], [['b']]]), ['a', 'b'], 'should flatten nested arrays');", - "assert.deepEqual(steamroller([1, [2], [3, [[4]]]]), [1, 2, 3, 4], 'should flatten nested arrays');", - "assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');", - "assert.deepEqual(steamroller([1, {}, [3, [[4]]]]), [1, {}, 3, 4], 'should work with actual objects');" + "assert.deepEqual(steamroller([[['a']], [['b']]]), ['a', 'b'], 'message: steamroller([[['a']], [['b']]]) should return ['a', 'b'].');", + "assert.deepEqual(steamroller([1, [2], [3, [[4]]]]), [1, 2, 3, 4], 'message: steamroller([1, [2], [3, [[4]]]]) should return [1, 2, 3, 4].');", + "assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'message: steamroller([1, [], [3, [[4]]]]) should return [1, 3, 4].');", + "assert.deepEqual(steamroller([1, {}, [3, [[4]]]]), [1, {}, 3, 4], 'message: steamroller([1, {}, [3, [[4]]]]) should return [1, {}, 3, 4].');" ], "MDNlinks": [ "Array.isArray()" @@ -757,8 +757,8 @@ "binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');" ], "tests": [ - "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!?\", \"binaryAgent() should return Aren't bonfires fun!?\");", - "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!\", 'message: binaryAgent() should return \"I love FreeCodeCamp!\"');" + "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!?\", '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!?\"');", + "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!\", 'message: 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!\"');" ], "MDNlinks": [ "String.charCodeAt()", @@ -796,9 +796,9 @@ "every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex');" ], "tests": [ - "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex'), true, 'should return true if predicate returns truthy for all elements in the collection');", - "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');", - "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'should return false if predicate returns falsey for any element in the collection');" + "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex'), true, 'message: every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], 'sex') should return true.');", + "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'message: every([{'user': 'Tinky-Winky', 'sex': 'male'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}) should return false.');", + "assert.strictEqual(every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}), false, 'message: every([{'user': 'Tinky-Winky', 'sex': 'female'}, {'user': 'Dipsy', 'sex': 'male'}, {'user': 'Laa-Laa', 'sex': 'female'}, {'user': 'Po', 'sex': 'female'}], {'sex': 'female'}) should return false.');" ], "MDNlinks": [ "Object.hasOwnProperty()", @@ -838,11 +838,11 @@ "add(2,3);" ], "tests": [ - "assert.deepEqual(add(2, 3), 5, 'message: add(2, 3) should return 5');", - "assert.deepEqual(add(2)(3), 5, 'message: add(2)(3) should return 5');", - "assert.isUndefined(add(\"http://bit.ly/IqT6zt\"), 'message: add(\"http://bit.ly/IqT6zt\") should return undefined');", - "assert.isUndefined(add(2, \"3\"), 'message: add(2, \"3\") should return undefined');", - "assert.isUndefined(add(2)([3]), 'message: add(2)([3]) should return undefined');" + "assert.deepEqual(add(2, 3), 5, 'message: add(2, 3) should return 5.');", + "assert.deepEqual(add(2)(3), 5, 'message: add(2)(3) should return 5.');", + "assert.isUndefined(add(\"http://bit.ly/IqT6zt\"), 'message: add(\"http://bit.ly/IqT6zt\") should return undefined.');", + "assert.isUndefined(add(2, \"3\"), 'message: add(2, \"3\") should return undefined.');", + "assert.isUndefined(add(2)([3]), 'message: add(2)([3]) should return undefined.');" ], "MDNlinks": [ "Global Function Object",