Package: Validate challenges on test (#17216)

This PR allows us to validate the schema during test.

It also removes some cruft from the seed files and ensures only the required data is packaged and consumable, reducing the package weight somewhat.
This commit is contained in:
Stuart Taylor
2018-05-22 13:43:14 +01:00
committed by mrugesh mohapatra
parent afc948890c
commit 4e645a5ff6
51 changed files with 49 additions and 1377 deletions

View File

@ -42,7 +42,6 @@
"testString": "assert(convertToF(30) === 86, '<code>convertToF(30)</code> should return a value of <code>86</code>');"
}
],
"type": "checkpoint",
"challengeType": 1,
"isRequired": true,
"translations": {
@ -107,7 +106,6 @@
"testString": "assert(reverseString(\"Greetings from Earth\") === \"htraE morf sgniteerG\", '<code>reverseString(\"Greetings from Earth\")</code> should return <code>\"htraE morf sgniteerG\"</code>.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function reverseString(str) {\n return str.split('').reverse().join('');\n}\n\nreverseString(\"hello\");\n"
@ -189,7 +187,6 @@
"testString": "assert(factorialize(0) === 1, '<code>factorialize(0)</code> should return 1.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function factorialize(num) {\n return num < 1 ? 1 : num * factorialize(num - 1);\n}\n\nfactorialize(5);\n"
@ -271,7 +268,6 @@
"testString": "assert(findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\") === 19, '<code>findLongestWordLength(\"What if we try a super-long word such as otorhinolaryngology\")</code> should return 19.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function findLongestWordLength(str) {\n return str.split(' ').sort((a, b) => b.length - a.length)[0].length;\n}\n\nfindLongestWordLength(\"The quick brown fox jumped over the lazy dog\");\n"
@ -342,7 +338,6 @@
"testString": "assert.deepEqual(largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]]), [25, 48, 21, -3], '<code>largestOfFour([[17, 23, 25, 12], [25, 7, 34, 48], [4, -10, 18, 21], [-72, -3, -17, -10]])</code> should return <code>[25, 48, 21, -3]</code>.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function largestOfFour(arr) {\n return arr.map(subArr => Math.max.apply(null, subArr));\n}\n\nlargestOfFour([[4, 5, 1, 3], [13, 27, 18, 26], [32, 35, 37, 39], [1000, 1001, 857, 1]]);\n"
@ -442,7 +437,6 @@
"testString": "assert(!(/\\.endsWith\\(.*?\\)\\s*?;?/.test(code)) && !(/\\['endsWith'\\]/.test(code)), 'Do not use the built-in method <code>.endsWith()</code> to solve the challenge.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function confirmEnding(str, target) {\n return str.substring(str.length - target.length) === target;\n}\n\nconfirmEnding(\"Bastian\", \"n\");\n"
@ -525,7 +519,6 @@
"testString": "assert(!/\\.repeat/g.test(code), 'The built-in <code>repeat()</code>-method should not be used');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function repeatStringNumTimes(str, num) {\n if (num < 0) return '';\n return num === 1 ? str : str + repeatStringNumTimes(str, num-1);\n}\n\nrepeatStringNumTimes(\"abc\", 3);\n"
@ -601,7 +594,6 @@
"testString": "assert(truncateString(\"Absolutely Longer\", 2) === \"Ab...\", '<code>truncateString(\"Absolutely Longer\", 2)</code> should return \"Ab...\".');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function truncateString(str, num) {\n if (num >= str.length) {\n return str;\n }\n\n return str.slice(0, num) + '...';\n}\n\ntruncateString(\"A-tisket a-tasket A green and yellow basket\", 8);\n"
@ -664,7 +656,6 @@
"testString": "assert.strictEqual(findElement([1, 3, 5, 9], function(num) { return num % 2 === 0; }), undefined, '<code>findElement([1, 3, 5, 9], function(num) { return num % 2 === 0; })</code> should return undefined.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Array.prototype.filter()"
],
@ -764,7 +755,6 @@
"testString": "assert.strictEqual(booWho(\"false\"), false, '<code>booWho(\"false\")</code> should return false.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Boolean Objects"
],
@ -840,7 +830,6 @@
"testString": "assert(titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\") === \"Here Is My Handle Here Is My Spout\", '<code>titleCase(\"HERE IS MY HANDLE HERE IS MY SPOUT\")</code> should return <code>Here Is My Handle Here Is My Spout</code>.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function titleCase(str) {\n return str.split(' ').map(word => word.charAt(0).toUpperCase() + word.substring(1).toLowerCase()).join(' ');\n}\n\ntitleCase(\"I'm a little tea pot\");\n"
@ -920,7 +909,6 @@
"testString": "assert(testArr2[0] === \"a\" && testArr2[1] === \"b\", 'The second array should remain the same after the function runs.');"
}
],
"type": "bonfire",
"isRequired": true,
"isBeta": true,
"solutions": [
@ -990,7 +978,6 @@
"testString": "assert.deepEqual(bouncer([1, null, NaN, 2, undefined]), [1, 2], '<code>bouncer([1, null, NaN, 2, undefined])</code> should return <code>[1, 2]</code>.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function bouncer(arr) {\n return arr.filter(e => e);\n}\n\nbouncer([7, \"ate\", \"\", false, 9]);\n"
@ -1112,7 +1099,6 @@
"testString": "assert(typeof(getIndexToIns([], 1)) === \"number\", '<code>getIndexToIns([], 1)</code> should return a number.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function getIndexToIns(arr, num) {\n arr = arr.sort((a, b) => a - b);\n\n for (let i = 0; i < arr.length; i++) {\n if (arr[i] >= num) {\n return i;\n }\n }\n\n return arr.length;\n}\n\ngetIndexToIns([40, 60], 50);\n"
@ -1207,7 +1193,6 @@
"testString": "assert(mutation([\"voodoo\", \"no\"]) === false, '<code>mutation([\"voodoo\", \"no\"])</code> should return false.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function mutation(arr) {\n let hash = Object.create(null);\n\n arr[0].toLowerCase().split('').forEach(c => hash[c] = true);\n\n return !arr[1].toLowerCase().split('').filter(c => !hash[c]).length;\n}\n\nmutation([\"hello\", \"hey\"]);\n"
@ -1292,7 +1277,6 @@
"testString": "assert.deepEqual(chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2), [[0, 1], [2, 3], [4, 5], [6, 7], [8]], '<code>chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2)</code> should return <code>[[0, 1], [2, 3], [4, 5], [6, 7], [8]]</code>.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function chunkArrayInGroups(arr, size) {\n let out = [];\n\n for (let i = 0; i < arr.length; i += size) {\n out.push(arr.slice(i, i + size));\n }\n\n return out;\n}\n\nchunkArrayInGroups([\"a\", \"b\", \"c\", \"d\"], 2);\n"

View File

@ -38,7 +38,6 @@
"testString": "assert(yourArray.filter( el => typeof el === 'string').length >= 1, '<code>yourArray</code> contains at least one <code>string</code>');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -91,7 +90,6 @@
"testString": "assert.strictEqual(myArray[3], \"d\", '<code>myArray[3]</code> is equal to <code>\"d\"</code>');"
}
],
"type": "waypoint",
"solutions": [],
"challengeType": 1,
"translations": {},
@ -137,7 +135,6 @@
"testString": "assert.notStrictEqual(mixedNumbers.toString().search(/\\.unshift\\(/), -1, 'The <code>mixedNumbers</code> function should utilize the <code>unshift()</code> method');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -189,7 +186,6 @@
"testString": "assert.notStrictEqual(popShift.toString().search(/\\.shift\\(/), -1, 'The <code>popShift</code> function should utilize the <code>shift()</code> method');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -236,7 +232,6 @@
"testString": "assert.notStrictEqual(sumOfTen.toString().search(/\\.splice\\(/), -1, 'The <code>sumOfTen</code> function should utilize the <code>splice()</code> method');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -290,7 +285,6 @@
"testString": "assert(!/\\[\\d\\]\\s*=/.test(code), 'You should not use array bracket notation.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -336,7 +330,6 @@
"testString": "assert(/\\.slice\\(/.test(code), 'The <code>forecast</code> function should utilize the <code>slice()</code> method');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -393,7 +386,6 @@
"testString": "assert.notStrictEqual(copyMachine.toString().indexOf('.concat(_toConsumableArray(arr))'), -1, 'The <code>copyMachine</code> function should utilize the <code>spread operator</code> with array <code>arr</code>');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -443,7 +435,6 @@
"testString": "assert.notStrictEqual(spreadOut.toString().search(/[...]/), -1, 'The <code>spreadOut</code> function should utilize spread syntax');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -500,7 +491,6 @@
"testString": "assert.notStrictEqual(quickCheck.toString().search(/\\.indexOf\\(/), -1, 'The <code>quickCheck</code> function should utilize the <code>indexOf()</code> method');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -558,7 +548,6 @@
"testString": "assert.notStrictEqual(filteredArray.toString().search(/for/), -1, 'The <code>filteredArray</code> function should utilize a <code>for</code> loop');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -622,7 +611,6 @@
"testString": "assert((function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deepest').length === 1 && (function howDeep(array, target, depth = 0) {return array.reduce((combined, current) => {if (Array.isArray(current)) { return combined.concat(howDeep(current, target, depth + 1));} else if (current === target) { return combined.concat(depth);} else { return combined;}}, []);})(myNestedArray, 'deepest')[0] === 4, '<code>myNestedArray</code> should contain exactly one occurrence of the string <code>\"deepest\"</code> on an array nested 5 levels deep');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -684,7 +672,6 @@
"testString": "assert(code.search(/bananas:/) === -1 && code.search(/grapes:/) === -1 && code.search(/strawberries:/) === -1, 'The key-value pairs should be set using dot or bracket notation');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -740,7 +727,6 @@
"testString": "assert.strictEqual(code.search(/online: 45/), -1, 'The <code>online</code> property is set using dot or bracket notation');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -803,7 +789,6 @@
"testString": "assert.strictEqual(checkInventory('strawberries'), 27, '<code>checkInventory(\"strawberries\")</code> should return <code>27</code>');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -858,7 +843,6 @@
"testString": "assert(code.search(/oranges:/) !== -1 && code.search(/plums:/) !== -1 && code.search(/strawberries:/) !== -1, 'The <code>oranges</code>, <code>plums</code>, and <code>strawberries</code> keys are removed using <code>delete</code>');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -912,7 +896,6 @@
"testString": "assert((function() { delete users.Alan; delete users.Jeff; delete users.Sarah; delete users.Ryan; return isEveryoneHere(users) })() === false, 'The function <code>isEveryoneHere</code> returns <code>false</code> if <code>Alan</code>, <code>Jeff</code>, <code>Sarah</code>, and <code>Ryan</code> are not properties on the <code>users</code> object');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -976,7 +959,6 @@
"testString": "assert((function() { users.Harry = {online: true}; users.Sam = {online: true}; users.Carl = {online: true}; return countOnline(users) })() === 5, 'The function <code>countOnline</code> returns the number of users with the <code>online</code> property set to <code>true</code>');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -1037,7 +1019,6 @@
"testString": "assert((function() { users.Sam = {}; users.Lewis = {}; let R = getArrayOfUsers(users); return (R.indexOf('Alan') !== -1 && R.indexOf('Jeff') !== -1 && R.indexOf('Sarah') !== -1 && R.indexOf('Ryan') !== -1 && R.indexOf('Sam') !== -1 && R.indexOf('Lewis') !== -1); })() === true, 'The <code>getArrayOfUsers</code> function returns an array which contains all the keys in the <code>users</code> object');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,
@ -1102,7 +1083,6 @@
"testString": "assert.deepEqual((function() { delete user.data.friends; user.data.friends = ['Sam', 'Kira', 'Tomo']; return addFriend(user, 'Pete') })(), ['Sam', 'Kira', 'Tomo', 'Pete'], '<code>addFriend(user, \"Pete\")</code> should return <code>[\"Sam\", \"Kira\", \"Tomo\", \"Pete\"]</code>');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"solutions": [],
"challengeType": 1,

View File

@ -31,7 +31,6 @@
"testString": "assert(code.match(/(\\/\\*)([^\\*\\/]{5,})(?=\\*\\/)/gm), 'Create a <code>/* */</code> style comment that contains at least five letters.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -98,7 +97,6 @@
"testString": "assert(/var\\s+myName\\s*;/.test(code), 'You should declare <code>myName</code> with the <code>var</code> keyword, ending with a semicolon');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -183,7 +181,6 @@
"testString": "assert(/b\\s*=\\s*a\\s*;/g.test(code), '<code>a</code> should be assigned to <code>b</code> with <code>=</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -248,7 +245,6 @@
"testString": "assert(/var\\s+a\\s*=\\s*9\\s*/.test(code), 'Initialize <code>a</code> to a value of <code>9</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -311,7 +307,6 @@
"testString": "assert(/a = a \\+ 1;/.test(code) && /b = b \\+ 5;/.test(code) && /c = c \\+ \" String!\";/.test(code), 'Do not change code below the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -391,7 +386,6 @@
"testString": "assert(code.match(/titleCaseOver/g).length === 2, '<code>titleCaseOver</code> should use camelCase in both declaration and assignment sections.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -454,7 +448,6 @@
"testString": "assert(/\\+/.test(code), 'Use the <code>+</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -508,7 +501,6 @@
"testString": "assert(/var\\s*difference\\s*=\\s*45\\s*-\\s*[0-9]*;(?!\\s*[a-zA-Z0-9]+)/.test(code),'Only subtract one number from 45.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -563,7 +555,6 @@
"testString": "assert(/\\*/.test(code), 'Use the <code>*</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -618,7 +609,6 @@
"testString": "assert(/\\d+\\s*\\/\\s*\\d+/.test(code), 'Use the <code>/</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -682,7 +672,6 @@
"testString": "assert(/var myVar = 87;/.test(code), 'Do not change code above the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -751,7 +740,6 @@
"testString": "assert(/var myVar = 11;/.test(code), 'Do not change code above the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -808,7 +796,6 @@
"testString": "assert(myDecimal % 1 != 0, '<code>myDecimal</code> should have a decimal point'); "
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -862,7 +849,6 @@
"testString": "assert(/\\*/.test(code), 'You should use the <code>*</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -915,7 +901,6 @@
"testString": "assert(code.match(/quotient/g).length === 1, 'The quotient variable should only be assigned once');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -975,7 +960,6 @@
"testString": "assert(/\\s+?remainder\\s*?=\\s*?.*%.*;/.test(code), 'You should use the <code>%</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1048,7 +1032,6 @@
"testString": "assert(/var a = 3;/.test(code) && /var b = 17;/.test(code) && /var c = 12;/.test(code), 'Do not modify the code above the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1125,7 +1108,6 @@
"testString": "assert(/var a = 11;/.test(code) && /var b = 9;/.test(code) && /var c = 3;/.test(code), 'Do not modify the code above the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1202,7 +1184,6 @@
"testString": "assert(/var a = 5;/.test(code) && /var b = 12;/.test(code) && /var c = 4\\.6;/.test(code), 'Do not modify the code above the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1279,7 +1260,6 @@
"testString": "assert(/var a = 48;/.test(code) && /var b = 108;/.test(code) && /var c = 33;/.test(code), 'Do not modify the code above the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1341,7 +1321,6 @@
"testString": "assert((function(){if(typeof myLastName !== \"undefined\" && typeof myLastName === \"string\" && myLastName.length > 0){return true;}else{return false;}})(), '<code>myLastName</code> should be a string with at least one character in it.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1400,7 +1379,6 @@
"testString": "assert(myStr === \"I am a \\\"double quoted\\\" string inside \\\"double quotes\\\".\", 'Variable myStr should contain the string: <code>I am a \"double quoted\" string inside \"double quotes\".</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1470,7 +1448,6 @@
"testString": "assert(code.match(/\"/g).length === 4 && code.match(/'/g).length === 2, 'You should have two single quotes <code>&#39;</code> and four double quotes <code>&quot;</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1546,7 +1523,6 @@
"testString": "assert(/SecondLine\\nThirdLine/.test(myStr), 'There should be a newline character between <code>SecondLine</code> and <code>ThirdLine</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1612,7 +1588,6 @@
"testString": "assert(/myStr\\s*=/.test(code), 'Make sure to assign the result to the <code>myStr</code> variable.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1678,7 +1653,6 @@
"testString": "assert(code.match(/\\w\\s*\\+=\\s*[\"']/g).length > 1 && code.match(/\\w\\s*\\=\\s*[\"']/g).length > 1, 'Use the <code>+=</code> operator to build <code>myStr</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1742,7 +1716,6 @@
"testString": "assert(code.match(/[\"']\\s*\\+\\s*myName\\s*\\+\\s*[\"']/g).length > 0, 'Use two <code>+</code> operators to build <code>myStr</code> with <code>myName</code> inside it');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1812,7 +1785,6 @@
"testString": "assert(code.match(/myStr\\s*\\+=\\s*someAdjective\\s*/).length > 0, 'Append <code>someAdjective</code> to <code>myStr</code> using the <code>+=</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1885,7 +1857,6 @@
"testString": "assert((function(){if(code.match(/\\.length/gi) && code.match(/\\.length/gi).length >= 2 && code.match(/var lastNameLength \\= 0;/gi) && code.match(/var lastNameLength \\= 0;/gi).length >= 1){return true;}else{return false;}})(), 'You should be getting the length of <code>lastName</code> by using <code>.length</code> like this: <code>lastName.length</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -1950,7 +1921,6 @@
"testString": "assert(code.match(/firstLetterOfLastName\\s*?=\\s*?lastName\\[.*?\\]/), 'You should use bracket notation.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2018,7 +1988,6 @@
"testString": "assert(/myStr = \"Jello World\"/.test(code), 'Do not change the code above the line');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2079,7 +2048,6 @@
"testString": "assert(code.match(/thirdLetterOfLastName\\s*?=\\s*?lastName\\[.*?\\]/), 'You should use bracket notation.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2141,7 +2109,6 @@
"testString": "assert(code.match(/\\.length/g).length === 2, 'You have to use <code>.length</code> to get the last letter.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2203,7 +2170,6 @@
"testString": "assert(code.match(/\\.length/g).length === 2, 'You have to use <code>.length</code> to get the second last letter.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2273,7 +2239,6 @@
"testString": "assert(/\\bcat\\b/.test(test2) && /\\blittle\\b/.test(test2) && /\\bhit\\b/.test(test2) && /\\bslowly\\b/.test(test2),'<code>wordBlanks(\"cat\", \"little\", \"hit\", \"slowly\")</code> should contain all of the passed in words separated by non-word characters (and any additional words in your madlib).');"
}
],
"type": "checkpoint",
"challengeType": 1,
"translations": {
"es": {
@ -2339,7 +2304,6 @@
"testString": "assert(typeof myArray[1] !== 'undefined' && typeof myArray[1] == 'number', 'The second item in <code>myArray</code> should be a <code>number</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2390,7 +2354,6 @@
"testString": "assert(Array.isArray(myArray) && myArray.some(Array.isArray), '<code>myArray</code> should have at least one array nested within another array.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2447,7 +2410,6 @@
"testString": "assert((function(){if(code.match(/\\s*=\\s*myArray\\[0\\]/g)){return true;}else{return false;}})(), 'The data in variable <code>myArray</code> should be accessed using bracket notation.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2512,7 +2474,6 @@
"testString": "assert((function(){if(code.match(/myArray\\[0\\]\\s*=\\s*/g)){return true;}else{return false;}})(), 'You should be using correct index to modify the value in <code>myArray</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2576,7 +2537,6 @@
"testString": "assert(/myArray\\[2\\]\\[1\\]/g.test(code) && !/myData\\s*=\\s*(?:.*[-+*/%]|\\d)/g.test(code), 'You should be using bracket notation to read the correct value from <code>myArray</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2630,7 +2590,6 @@
"testString": "assert((function(d){if(d[2] != undefined && d[0][0] == 'John' && d[0][1] === 23 && d[2][0] == 'dog' && d[2][1] === 3 && d[2].length == 2){return true;}else{return false;}})(myArray), '<code>myArray</code> should now equal <code>[[\"John\", 23], [\"cat\", 2], [\"dog\", 3]]</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2695,7 +2654,6 @@
"testString": "assert((function(d){if(d[0] == 'cat' && d[1] === 2 && d[2] == undefined){return true;}else{return false;}})(removedFromMyArray), '<code>removedFromMyArray</code> should only contain <code>[\"cat\", 2]</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2757,7 +2715,6 @@
"testString": "assert((function(d){if(d[0] == 'John' && d[1] === 23 && typeof removedFromMyArray === 'object'){return true;}else{return false;}})(removedFromMyArray), '<code>removedFromMyArray</code> should contain <code>[\"John\", 23]</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2814,7 +2771,6 @@
"testString": "assert((function(d){if(typeof d[0] === \"object\" && d[0][0] == 'Paul' && d[0][1] === 35 && d[1][0] != undefined && d[1][0] == 'dog' && d[1][1] != undefined && d[1][1] == 3){return true;}else{return false;}})(myArray), '<code>myArray</code> should now have [[\"Paul\", 35], [\"dog\", 3]].');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -2885,7 +2841,6 @@
"testString": "assert(count > 4, 'You must have at least 5 items in your list');"
}
],
"type": "checkpoint",
"challengeType": 1,
"translations": {
"es": {
@ -2970,7 +2925,6 @@
"testString": "assert(/^\\s*reusableFunction\\(\\)\\s*;/m.test(code), 'Call <code>reusableFunction</code> after you define it');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3073,7 +3027,6 @@
"testString": "assert(/^\\s*functionWithArgs\\s*\\(\\s*\\d+\\s*,\\s*\\d+\\s*\\)\\s*;/m.test(code), 'Call <code>functionWithArgs</code> with two numbers after you define it.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3172,7 +3125,6 @@
"testString": "assert(typeof oopsGlobal != \"undefined\" && oopsGlobal === 5, '<code>oopsGlobal</code> should be a global variable and have a value of <code>5</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3269,7 +3221,6 @@
"testString": "assert(/var\\s+myVar/.test(code), 'Add a local <code>myVar</code> variable');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3361,7 +3312,6 @@
"testString": "assert(/return outerWear/.test(code), 'Do not change the return statement');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3438,7 +3388,6 @@
"testString": "assert(timesFive(0) === 0, '<code>timesFive(0)</code> should return <code>0</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3508,7 +3457,6 @@
"testString": "assert(code.match(/(sum\\s*\\=\\s*sum\\s*\\+\\s*5)|(sum\\s*\\+\\=\\s*5)/g).length === 1, 'Inside of your functions, add 5 to the <code>sum</code> variable');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -3565,7 +3513,6 @@
"testString": "assert(/processed\\s*=\\s*processArg\\(\\s*7\\s*\\)\\s*;/.test(code), 'You should assign <code>processArg</code> to <code>processed</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3649,7 +3596,6 @@
"testString": "nextInLine(testArr, 10); assert(testArr[4] === 10, 'After <code>nextInLine(testArr, 10)</code>, <code>testArr[4]</code> should be <code>10</code>');"
}
],
"type": "checkpoint",
"challengeType": 1,
"translations": {
"es": {
@ -3732,7 +3678,6 @@
"testString": "assert(welcomeToBooleans() === true, '<code>welcomeToBooleans()</code> should return true.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3806,7 +3751,6 @@
"testString": "assert(trueOrFalse(false) === \"No, that was false\", '<code>trueOrFalse(false)</code> should return \"No, that was false\"');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3894,7 +3838,6 @@
"testString": "assert(code.match(/==/g) && !code.match(/===/g), 'You should use the <code>==</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -3967,7 +3910,6 @@
"testString": "assert(code.match(/(val\\s*===\\s*\\d+)|(\\d+\\s*===\\s*val)/g).length > 0, 'You should use the <code>===</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4035,7 +3977,6 @@
"testString": "assert(code.match(/===/g), 'You should use the <code>===</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -4100,7 +4041,6 @@
"testString": "assert(code.match(/(?!!==)!=/), 'You should use the <code>!=</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4175,7 +4115,6 @@
"testString": "assert(code.match(/(val\\s*!==\\s*\\d+)|(\\d+\\s*!==\\s*val)/g).length > 0, 'You should use the <code>!==</code> operator');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4265,7 +4204,6 @@
"testString": "assert(code.match(/val\\s*>\\s*('|\")*\\d+('|\")*/g).length > 1, 'You should use the <code>&gt;</code> operator at least twice');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4355,7 +4293,6 @@
"testString": "assert(code.match(/val\\s*>=\\s*('|\")*\\d+('|\")*/g).length > 1, 'You should use the <code>&gt;=</code> operator at least twice');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4440,7 +4377,6 @@
"testString": "assert(code.match(/val\\s*<\\s*('|\")*\\d+('|\")*/g).length > 1, 'You should use the <code>&lt;</code> operator at least twice');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4528,7 +4464,6 @@
"testString": "assert(code.match(/val\\s*<=\\s*('|\")*\\d+('|\")*/g).length > 1, 'You should use the <code>&lt;=</code> operator at least twice');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4627,7 +4562,6 @@
"testString": "assert(testLogicalAnd(80) === \"No\", '<code>testLogicalAnd(80)</code> should return \"No\"');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4729,7 +4663,6 @@
"testString": "assert(testLogicalOr(25) === \"Outside\", '<code>testLogicalOr(25)</code> should return \"Outside\"');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4817,7 +4750,6 @@
"testString": "assert(/var result = \"\";/.test(code) && /return result;/.test(code), 'Do not change the code above or below the lines.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4904,7 +4836,6 @@
"testString": "assert(testElseIf(12) === \"Greater than 10\", '<code>testElseIf(12)</code> should return \"Greater than 10\"');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -4977,7 +4908,6 @@
"testString": "assert(orderMyLogic(11) === \"Greater than or equal to 10\", '<code>orderMyLogic(11)</code> should return \"Greater than or equal to 10\"');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5089,7 +5019,6 @@
"testString": "assert(testSize(25) === \"Huge\", '<code>testSize(25)</code> should return \"Huge\"');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5184,7 +5113,6 @@
"testString": "assert(golfScore(5, 9) === \"Go Home!\", '<code>golfScore(5, 9)</code> should return \"Go Home!\"');"
}
],
"type": "checkpoint",
"challengeType": 1,
"translations": {
"es": {
@ -5261,7 +5189,6 @@
"testString": "assert(code.match(/break/g).length > 2, 'You should have at least 3 <code>break</code> statements');"
}
],
"type": "waypoint",
"MDNlinks": [
"Switch Statement"
],
@ -5352,7 +5279,6 @@
"testString": "assert(code.match(/break/g).length > 2, 'You should have at least 3 <code>break</code> statements');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5453,7 +5379,6 @@
"testString": "assert(code.match(/case/g).length === 9, 'You should have nine <code>case</code> statements');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5550,7 +5475,6 @@
"testString": "assert(chainToSwitch(156) === \"\", '<code>chainToSwitch(156)</code> should be \"\" (empty string)');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5630,7 +5554,6 @@
"testString": "assert(!/if|else/g.test(code), 'You should not use any <code>if</code> or <code>else</code> statements');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5711,7 +5634,6 @@
"testString": "assert(abTest(3,3) === 12 , '<code>abTest(3,3)</code> should return <code>12</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5797,7 +5719,6 @@
"testString": "assert((function(){ count = 0; cc(3);cc(2);cc('A');cc(10);var out = cc('K'); if(out === \"-1 Hold\") {return true;} return false; })(), 'Cards Sequence 3, 2, A, 10, K should return <code>-1 Hold</code>');"
}
],
"type": "checkpoint",
"challengeType": 1,
"translations": {
"es": {
@ -5877,7 +5798,6 @@
"testString": "assert((function(z){return Object.keys(z).length === 4;})(myDog), '<code>myDog</code> should only contain all the given properties.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -5965,7 +5885,6 @@
"testString": "assert(code.match(/testObj\\.\\w+/g).length > 1, 'You should use dot notation twice');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6043,7 +5962,6 @@
"testString": "assert(code.match(/testObj\\s*?\\[('|\")[^'\"]+\\1\\]/g).length > 1, 'You should use bracket notation twice');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6127,7 +6045,6 @@
"testString": "assert(/testObj\\s*?\\[\\s*playerNumber\\s*\\]/.test(code),'You should be using the variable <code>playerNumber</code> in your bracket notation');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6197,7 +6114,6 @@
"testString": "assert(/\"name\": \"Coder\"/.test(code), 'Do not edit the <code>myDog</code> definition');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6280,7 +6196,6 @@
"testString": "assert(!/bark[^\\n]:/.test(code), 'Do not add <code>\"bark\"</code> to the setup section');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6351,7 +6266,6 @@
"testString": "assert(code.match(/\"tails\": 1/g).length > 1, 'Do not modify the <code>myDog</code> setup');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6453,7 +6367,6 @@
"testString": "assert(!/case|switch|if/g.test(code), 'You should not use <code>case</code>, <code>switch</code>, or <code>if</code> statements'); "
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6538,7 +6451,6 @@
"testString": "assert(checkObj(\"house\") === \"Not Found\", '<code>checkObj(\"house\")</code> should return <code>\"Not Found\"</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6636,7 +6548,6 @@
"testString": "assert(myMusic[1].formats.every(function(item) { return (typeof item === \"string\")}) && myMusic[1].formats.length > 1, '<code>formats</code> should be an array of strings with at least two elements');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6705,7 +6616,6 @@
"testString": "assert(/=\\s*myStorage\\.car\\.inside\\[\\s*(\"|')glove box\\1\\s*\\]/g.test(code), 'Use dot and bracket notation to access <code>myStorage</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6778,7 +6688,6 @@
"testString": "assert(/=\\s*myPlants\\[1\\].list\\[1\\]/.test(code), 'Use dot and bracket notation to access <code>myPlants</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -6886,7 +6795,6 @@
"testString": "assert(updateRecords(1245, \"album\", \"Riptide\")[1245][\"album\"] === \"Riptide\", 'After <code>updateRecords(1245, \"album\", \"Riptide\")</code>, <code>album</code> should be <code>\"Riptide\"</code>');"
}
],
"type": "checkpoint",
"challengeType": 1,
"translations": {
"es": {
@ -6980,7 +6888,6 @@
"testString": "assert.deepEqual(myArray, [0,1,2,3,4], '<code>myArray</code> should equal <code>[0,1,2,3,4]</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7050,7 +6957,6 @@
"testString": "assert.deepEqual(myArray, [1,2,3,4,5], '<code>myArray</code> should equal <code>[1,2,3,4,5]</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7126,7 +7032,6 @@
"testString": "assert.deepEqual(myArray, [1,3,5,7,9], '<code>myArray</code> should equal <code>[1,3,5,7,9]</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7202,7 +7107,6 @@
"testString": "assert.deepEqual(myArray, [9,7,5,3,1], '<code>myArray</code> should equal <code>[9,7,5,3,1]</code>.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7281,7 +7185,6 @@
"testString": "assert(!code.match(/total[\\s\\+\\-]*=\\s*(\\d(?!\\s*[;,])|[1-9])/g), 'Do not set <code>total</code> to 20 directly');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7351,7 +7254,6 @@
"testString": "assert(multiplyAll([[5,1],[0.2, 4, 0.5],[3, 9]]) === 54, '<code>multiplyAll([[5,1],[0.2, 4, 0.5],[3, 9]])</code> should return <code>54</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7424,7 +7326,6 @@
"testString": "assert.deepEqual(i, 11, '<code>i</code> should equal <code>11</code>');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -7493,7 +7394,6 @@
"testString": "assert(lookUpProfile(\"Akira\", \"address\") === \"No such property\", '<code>\"Akira\", \"address\"</code> should return \"No such property\"');"
}
],
"type": "checkpoint",
"challengeType": 1,
"translations": {
"es": {
@ -7585,7 +7485,6 @@
"testString": "assert(code.match(/Math\\.random/g).length >= 0, 'You should be using <code>Math.random</code> to generate the random decimal number.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7655,7 +7554,6 @@
"testString": "assert(code.match(/Math.floor/g).length > 1, 'You should use <code>Math.floor</code> to remove the decimal part of the number.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7729,7 +7627,6 @@
"testString": "assert((function(){if(code.match(/myMax/g).length > 1 && code.match(/myMin/g).length > 2 && code.match(/Math.floor/g) && code.match(/Math.random/g)){return true;}else{return false;}})(), '<code>randomRange</code> should use both <code>myMax</code> and <code>myMin</code>, and return a random number in your range.');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {
"es": {
@ -7823,7 +7720,6 @@
"testString": "assert.isNaN(convertToInteger(\"JamesBond\"), '<code>convertToInteger(\"JamesBond\")</code> should return NaN');"
}
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"releasedOn": "February 17, 2017",
@ -7880,7 +7776,6 @@
"testString": "assert.isNaN(convertToInteger(\"JamesBond\"), '<code>convertToInteger(\"JamesBond\")</code> should return NaN');"
}
],
"type": "waypoint",
"challengeType": 1,
"releasedOn": "February 17, 2017",
"translations": {},
@ -7934,7 +7829,6 @@
"testString": "assert(checkEqual(1, -1) === false, '<code>checkEqual(1, -1)</code> should return false');"
}
],
"type": "waypoint",
"challengeType": 1,
"releasedOn": "February 17, 2017",
"translations": {},
@ -7986,7 +7880,6 @@
"testString": "assert(checkSign(0) === 'zero', '<code>checkSign(0)</code> should return \"zero\". Note that capitalization matters');"
}
],
"type": "waypoint",
"challengeType": 1,
"releasedOn": "February 17, 2017",
"translations": {},

View File

@ -24,7 +24,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -78,7 +77,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -133,7 +131,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -187,7 +184,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -228,7 +224,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -272,7 +267,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -314,7 +308,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -363,7 +356,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -407,7 +399,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -461,7 +452,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -513,7 +503,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -571,7 +560,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},

View File

@ -37,7 +37,6 @@
"testString": "assert(quote === \"Oliver says Meow!\", '<code>quote</code> should be <code>\"Oliver says Meow!\"</code>');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -96,7 +95,6 @@
"testString": "assert(checkScope() === \"function scope\", '<code>checkScope()</code> should return \"function scope\"');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -147,7 +145,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/(let i)/g), '<code>i</code> should be a variable only defined within the for loop scope (by using<code>let</code>).');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -207,7 +204,6 @@
"testString": "assert.deepEqual(s, [2, 5, 7], '<code>s</code> should be equal to <code>[2, 5, 7]</code>.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -261,7 +257,6 @@
"testString": "assert(PI === 3.14, '<code>PI</code> equals <code>3.14</code>.');"
}
],
"type": "waypoint",
"releasedOn": "Aug 12, 2017",
"challengeType": 1,
"translations": {},
@ -331,7 +326,6 @@
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -383,7 +377,6 @@
"testString": "getUserInput => assert(!getUserInput('index').match(/function/g), '<code>function</code> keyword was not used.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -449,7 +442,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/map|filter|reduce/g), '<code>map</code>, <code>filter</code>, or <code>reduce</code> should be used');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -501,7 +493,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/value\\s*=\\s*1/g), 'default parameter <code>1</code> was used for <code>value</code>.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -558,7 +549,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/function\\s+sum\\s*\\(\\s*...args\\s*\\)\\s*{/g), 'The <code>sum</code> function uses the <code>...</code> spread operator on the <code>args</code> parameter.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -612,7 +602,6 @@
"testString": "assert((arr1, arr2) => {arr1.push('JUN'); return arr2.length < arr1.length},'<code>arr2</code> remains unchanged when <code>arr1</code> is changed.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -665,7 +654,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/\\{\\s*length\\s*:\\s*len\\s*}\\s*=\\s*str/g),'destructuring with reassignment was used');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -714,7 +702,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/\\{\\s*tomorrow\\s*:\\s*\\{\\s*max\\s*:\\s*maxOfTomorrow\\s*\\}\\s*\\}\\s*=\\s*forecast/g),'nested destructuring was used');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -772,7 +759,6 @@
"testString": "// assert(/\\[\\s*(\\w)\\s*,\\s*(\\w)\\s*\\]\\s*=\\s*\\[\\s*\\2\\s*,\\s*\\1\\s*\\]/g.test(code), 'Use array destructuring to swap a and b.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -823,7 +809,6 @@
"testString": "getUserInput => assert(!getUserInput('index').match(/Array.slice/g), '<code>Array.slice()</code> was not used.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -878,7 +863,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/\\(\\s*\\{\\s*\\w+\\s*,\\s*\\w+\\s*\\}\\s*\\)/g), 'Destructuring was used.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -943,7 +927,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/\\`<li class=\"text-warning\">\\$\\{\\w+\\}<\\/li>\\`/g), 'Template strings were used');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1004,7 +987,6 @@
"testString": "getUserInput => assert(!getUserInput('index').match(/:/g), 'No <code>:</code> were used.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1052,7 +1034,6 @@
"testString": "getUserInput => assert(!getUserInput('index').match(/:\\s*function\\s*\\(\\)/g), 'Declarative function was used.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1108,7 +1089,6 @@
"testString": "assert(() => {const a = new Vegetable(\"apple\"); return typeof a === 'object';},'<code>Vegetable</code> can be instantiated.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1168,7 +1148,6 @@
"testString": "assert(() => {const t = new Thermostat(32); return typeof t === 'object' && t.temperature === 0;}, '<code>Thermostat</code> can be instantiated.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1219,7 +1198,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+\\{\\s?capitalizeString\\s?\\}\\s+from\\s+\"string_functions\"/g), 'valid <code>import</code> statement');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1266,7 +1244,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+const\\s+boo\\s+=+\\s\"far\"/g), '<code>bar</code> is exported.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1306,7 +1283,6 @@
"testString": "assert(code.match(/import\\s+\\*\\s+as\\s+[a-zA-Z0-9_$]+\\s+from\\s*\"\\s*capitalize_strings\\s*\"\\s*;/gi), 'Properly uses <code>import * as</code> syntax.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1348,7 +1324,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/export\\s+default\\s+function\\s+subtract\\(x,y\\)\\s+{return\\s+x\\s-\\s+y;}/g), 'Proper used of <code>export</code> fallback.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1385,7 +1360,6 @@
"testString": "getUserInput => assert(getUserInput('index').match(/import\\s+subtract\\s+from\\s+\"math_functions\"/g), 'Properly imports <code>export default</code> method.');"
}
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},

View File

@ -30,7 +30,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -109,7 +108,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -188,7 +186,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -266,7 +263,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -323,7 +319,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -385,7 +380,6 @@
"Consider using the concat method instead of push.",
"The slice method returns a new array without modifying the original."
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -464,7 +458,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -626,7 +619,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -685,7 +677,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -842,7 +833,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -906,7 +896,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -960,7 +949,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1012,7 +1000,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1071,7 +1058,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1130,7 +1116,6 @@
"Try using .map() to return an array of ratings.",
"You can use Number() to convert a string into a number."
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1297,7 +1282,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1347,7 +1331,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1403,7 +1386,6 @@
"hints": [
"The regex pre-defined character class for non-alphanumerics is \\W."
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1465,7 +1447,6 @@
"hints": [
"First try to split the given string before applying the join method."
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1532,7 +1513,6 @@
"When several spaces in a row are split by space, it puts an empty string in the array.",
"You can use the .toLowerCase() method to make the title all lower case."
],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1588,7 +1568,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1640,7 +1619,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {
@ -1698,7 +1676,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"challengeType": 1,
"translations": {},
"files": {

View File

@ -42,7 +42,6 @@
"testString": "assert.deepEqual(sumAll([10, 5]), 45, '<code>sumAll([10, 5])</code> should return 45.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Math.max()",
"Math.min()",
@ -158,7 +157,6 @@
"testString": "assert(diffArray([1, \"calf\", 3, \"piglet\"], [7, \"filly\"]).length === 6, '<code>[1, \"calf\", 3, \"piglet\"], [7, \"filly\"]</code> should return an array with six items.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Comparison Operators",
"Array.prototype.slice()",
@ -237,7 +235,6 @@
"testString": "assert.deepEqual(destroyer([\"possum\", \"trollo\", 12, \"safari\", \"hotdog\", 92, 65, \"grandma\", \"bugati\", \"trojan\", \"yacht\"], \"yacht\", \"possum\", \"trollo\", \"safari\", \"hotdog\", \"grandma\", \"bugati\", \"trojan\"), [12,92,65], '<code>destroyer([\"possum\", \"trollo\", 12, \"safari\", \"hotdog\", 92, 65, \"grandma\", \"bugati\", \"trojan\", \"yacht\"], \"yacht\", \"possum\", \"trollo\", \"safari\", \"hotdog\", \"grandma\", \"bugati\", \"trojan\")</code> should return <code>[12,92,65]</code>.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function destroyer(arr) {\n var hash = Object.create(null);\n [].slice.call(arguments, 1).forEach(function(e) {\n hash[e] = true;\n });\n // Remove all the values\n return arr.filter(function(e) { return !(e in hash);});\n}\n\ndestroyer([1, 2, 3, 1, 2, 3], 2, 3);\n"
@ -319,7 +316,6 @@
"testString": "assert.deepEqual(whatIsInAName([{ \"a\": 1, \"b\": 2, \"c\": 3 }], { \"a\": 1, \"b\": 9999, \"c\": 3 }), [], '<code>whatIsInAName([{\"a\": 1, \"b\": 2, \"c\": 3}], {\"a\": 1, \"b\": 9999, \"c\": 3})</code> should return <code>[]</code>');"
}
],
"type": "bonfire",
"MDNlinks": [
"Global Object",
"Object.prototype.hasOwnProperty()",
@ -400,7 +396,6 @@
"testString": "assert.strictEqual(spinalCase(\"AllThe-small Things\"), \"all-the-small-things\", '<code>spinalCase(\"AllThe-small Things\")</code> should return <code>\"all-the-small-things\"</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"RegExp",
"String.prototype.replace()"
@ -485,7 +480,6 @@
"testString": "assert.deepEqual(translatePigLatin(\"rhythm\"), \"rhythmay\", 'Should handle words without vowels.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Array.prototype.indexOf()",
"Array.prototype.push()",
@ -570,7 +564,6 @@
"testString": "assert.deepEqual(myReplace(\"Let us get back to more Coding\", \"Coding\", \"algorithms\"), \"Let us get back to more Algorithms\", '<code>myReplace(\"Let us get back to more Coding\", \"Coding\", \"algorithms\")</code> should return \"Let us get back to more Algorithms\".');"
}
],
"type": "bonfire",
"MDNlinks": [
"Array.prototype.splice()",
"String.prototype.replace()",
@ -647,7 +640,6 @@
"testString": "assert.deepEqual(pairElement(\"CTCTA\"),[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]], '<code>pairElement(\"CTCTA\")</code> should return <code>[[\"C\",\"G\"],[\"T\",\"A\"],[\"C\",\"G\"],[\"T\",\"A\"],[\"A\",\"T\"]]</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Array.prototype.push()",
"String.prototype.split()"
@ -728,7 +720,6 @@
"testString": "assert.isUndefined(fearNotLetter('abcdefghijklmnopqrstuvwxyz'), '<code>fearNotLetter(\"abcdefghijklmnopqrstuvwxyz\")</code> should return undefined.');"
}
],
"type": "bonfire",
"MDNlinks": [
"String.prototype.charCodeAt()",
"String.fromCharCode()"
@ -801,7 +792,6 @@
"testString": "assert.deepEqual(uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8]), [1, 2, 3, 5, 4, 6, 7, 8], '<code>uniteUnique([1, 2, 3], [5, 2, 1, 4], [2, 1], [6, 7, 8])</code> should return <code>[1, 2, 3, 5, 4, 6, 7, 8]</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Arguments object",
"Array.prototype.reduce()"
@ -887,7 +877,6 @@
"testString": "assert.strictEqual(convertHTML('abc'), 'abc', '<code>convertHTML(\"abc\")</code> should return <code>abc</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"RegExp",
"HTML Entities",
@ -967,7 +956,6 @@
"testString": "assert(sumFibs(75025) === 135721, '<code>sumFibs(75025)</code> should return 135721.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Remainder"
],
@ -1036,7 +1024,6 @@
"testString": "assert.deepEqual(sumPrimes(977), 73156, '<code>sumPrimes(977)</code> should return 73156.');"
}
],
"type": "bonfire",
"MDNlinks": [
"For Loops",
"Array.prototype.push()"
@ -1118,7 +1105,6 @@
"testString": "assert.deepEqual(smallestCommons([23, 18]), 6056820, '<code>smallestCommons([23, 18])</code> should return 6056820.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Smallest Common Multiple"
],
@ -1199,7 +1185,6 @@
"testString": "assert.deepEqual(dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;}), [3, 9, 2], '<code>dropElements([1, 2, 3, 9, 2], function(n) {return n > 2;})</code> should return <code>[3, 9, 2]</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Arguments object",
"Array.prototype.shift()",
@ -1271,7 +1256,6 @@
"testString": "assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4], '<code>steamrollArray([1, {}, [3, [[4]]]])</code> should return <code>[1, {}, 3, 4]</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Array.isArray()"
],
@ -1332,7 +1316,6 @@
"testString": "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!\", '<code>binaryAgent(\"01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001\")</code> should return \"I love FreeCodeCamp!\"');"
}
],
"type": "bonfire",
"MDNlinks": [
"String.prototype.charCodeAt()",
"String.fromCharCode()"
@ -1426,7 +1409,6 @@
}
],
"isRequired": true,
"type": "bonfire",
"MDNlinks": [
"Truthy",
"Falsy"
@ -1505,7 +1487,6 @@
"testString": "assert.isUndefined(addTogether(2)([3]), '<code>addTogether(2)([3])</code> should return undefined.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Closures",
"Arguments object"
@ -1620,7 +1601,6 @@
"testString": "assert.strictEqual((function () { bob.setFullName(\"Haskell Curry\"); return bob.getLastName(); })(), 'Curry', '<code>bob.getLastName()</code> should return \"Curry\" after <code>bob.setFullName(\"Haskell Curry\")</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Closures",
"Details of the Object Model"
@ -1707,7 +1687,6 @@
"testString": "assert.deepEqual(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}]), [{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}], '<code>orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])</code> should return <code>[{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]</code>.');"
}
],
"type": "bonfire",
"MDNlinks": [
"Math.pow()"
],

View File

@ -69,7 +69,6 @@
"testString": "assert(palindrome(\"five|\\_/|four\") === false, '<code>palindrome(\"five|\\_/|four\")</code> should return false.');"
}
],
"type": "bonfire",
"isRequired": true,
"solutions": [
"function palindrome(str) {\n var string = str.toLowerCase().split(/[^A-Za-z0-9]/gi).join('');\n var aux = string.split('');\n if (aux.join('') === aux.reverse().join('')){\n return true;\n }\n\n return false;\n}"
@ -240,7 +239,6 @@
"testString": "assert.deepEqual(convertToRoman(3999), \"MMMCMXCIX\", '<code>convertToRoman(3999)</code> should return \"MMMCMXCIX\"');"
}
],
"type": "bonfire",
"MDNlinks": [
"Roman Numerals",
"Array.prototype.splice()",
@ -315,7 +313,6 @@
"testString": "assert(rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\") === \"THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.\", '<code>rot13(\"GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT.\")</code> should decode to <code>THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.</code>');"
}
],
"type": "bonfire",
"MDNlinks": [
"String.prototype.charCodeAt()",
"String.fromCharCode()"
@ -487,7 +484,6 @@
"testString": "assert(telephoneCheck(\"(555)5(55?)-5555\") === false, '<code>telephoneCheck(\"(555)5(55?)-5555\")</code> should return false.');"
}
],
"type": "bonfire",
"MDNlinks": [
"RegExp"
],
@ -585,7 +581,6 @@
"testString": "assert.deepEqual(checkCashRegister(19.5, 20, [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]), {status: \"CLOSED\", change: [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]}, '<code>checkCashRegister(19.5, 20, [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]])</code> should return <code>{status: \"CLOSED\", change: [[\"PENNY\", 0.5], [\"NICKEL\", 0], [\"DIME\", 0], [\"QUARTER\", 0], [\"ONE\", 0], [\"FIVE\", 0], [\"TEN\", 0], [\"TWENTY\", 0], [\"ONE HUNDRED\", 0]]}</code>.');"
}
],
"type": "bonfire",
"isRequired": true,
"MDNlinks": [
"Global Object",

View File

@ -35,7 +35,6 @@
"let dog = {\n name: '',\n numLegs: 4\n};"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -78,7 +77,6 @@
"let dog = {\n name: \"Spot\",\n numLegs: 4\n};\nconsole.log(dog.name);\nconsole.log(dog.numLegs);"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -127,7 +125,6 @@
"let dog = {\n name: \"Spot\",\n numLegs: 4,\n sayLegs () {\n return 'This dog has ' + this.numLegs + ' legs.';\n }\n};\n\ndog.sayLegs();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -178,7 +175,6 @@
"let dog = {\n name: \"Spot\",\n numLegs: 4,\n sayLegs () {\n return 'This dog has ' + this.numLegs + ' legs.';\n }\n};\n\ndog.sayLegs();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -232,7 +228,6 @@
"function Dog (name, color, numLegs) {\n this.name = 'name';\n this.color = 'color';\n this.numLegs = 4;\n}"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -275,7 +270,6 @@
"function Dog() {\n this.name = \"Rupert\";\n this.color = \"brown\";\n this.numLegs = 4;\n}\nconst hound = new Dog();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -339,7 +333,6 @@
"function Dog (name, color) {\n this.numLegs = 4;\n this.name = name;\n this.color = color;\n}\n\nconst terrier = new Dog();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -385,7 +378,6 @@
"function House(numBedrooms) {\n this.numBedrooms = numBedrooms;\n}\nconst myHouse = new House(4);\nconsole.log(myHouse instanceof House);"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -438,7 +430,6 @@
"function Bird(name) {\n this.name = name;\n this.numLegs = 2;\n}\n\nlet canary = new Bird(\"Tweety\");\nfunction getOwnProps (obj) {\n const props = [];\n \n for (let prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n props.push(prop);\n }\n }\n \n return props;\n}\n\nconst ownProps = getOwnProps(canary);"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -498,7 +489,6 @@
"function Dog (name) {\n this.name = name;\n}\nDog.prototype.numLegs = 4;\nlet beagle = new Dog(\"Snoopy\");"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -551,7 +541,6 @@
"function Dog(name) {\n this.name = name;\n}\n\nDog.prototype.numLegs = 4;\n\nlet beagle = new Dog(\"Snoopy\");\n\nlet ownProps = [];\nlet prototypeProps = [];\nfor (let prop in beagle) {\n if (beagle.hasOwnProperty(prop)) {\n ownProps.push(prop);\n } else {\n prototypeProps.push(prop);\n }\n}"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -613,7 +602,6 @@
"function Dog(name) {\n this.name = name;\n}\nfunction joinDogFraternity(candidate) {\n return candidate.constructor === Dog;\n}"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -673,7 +661,6 @@
"function Dog(name) {\n this.name = name; \n}\nDog.prototype = {\nnumLegs: 4,\n eat () {\n console.log('nom nom nom');\n },\n describe () {\n console.log('My name is ' + this.name);\n }\n};"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -718,7 +705,6 @@
"function Dog(name) {\n this.name = name; \n}\nDog.prototype = {\n constructor: Dog,\n numLegs: 2, \n eat: function() {\n console.log(\"nom nom nom\"); \n }, \n describe: function() {\n console.log(\"My name is \" + this.name); \n }\n};"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -770,7 +756,6 @@
"function Dog(name) {\n this.name = name;\n}\nlet beagle = new Dog(\"Snoopy\");\nDog.prototype.isPrototypeOf(beagle);"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -821,7 +806,6 @@
"function Dog(name) {\n this.name = name;\n}\nlet beagle = new Dog(\"Snoopy\");\nDog.prototype.isPrototypeOf(beagle);\nObject.prototype.isPrototypeOf(Dog.prototype);"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -880,7 +864,6 @@
"function Cat(name) {\n this.name = name; \n}\n\nCat.prototype = {\n constructor: Cat\n};\n\nfunction Bear(name) {\n this.name = name; \n}\n\nBear.prototype = {\n constructor: Bear\n};\n\nfunction Animal() { }\n\nAnimal.prototype = {\n constructor: Animal,\n eat: function() {\n console.log(\"nom nom nom\");\n }\n};"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -963,7 +946,6 @@
"function Animal() { }\n\nAnimal.prototype = {\n constructor: Animal, \n eat: function() {\n console.log(\"nom nom nom\");\n }\n};\nlet duck = Object.create(Animal.prototype);\nlet beagle = Object.create(Animal.prototype);\n\nduck.eat();\nbeagle.eat();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1018,7 +1000,6 @@
"function Animal() { }\n\nAnimal.prototype = {\n constructor: Animal,\n eat: function() {\n console.log(\"nom nom nom\");\n }\n};\n\nfunction Dog() { }\nDog.prototype = Object.create(Animal.prototype);\n\nlet beagle = new Dog();\nbeagle.eat();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1084,7 +1065,6 @@
"function Animal() { }\nfunction Bird() { }\nfunction Dog() { }\nBird.prototype = Object.create(Animal.prototype);\nDog.prototype = Object.create(Animal.prototype);\nDog.prototype.constructor = Dog;\nBird.prototype.constructor = Bird;\nlet duck = new Bird();\nlet beagle = new Dog();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1155,7 +1135,6 @@
"hints": [
"Objects inherit methods from other objects by cloning their prototype. The Object.create method will come in handy, and don't forget to reset the constructor property afterward!"
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1220,7 +1199,6 @@
"function Bird() { }\n\nBird.prototype.fly = function() { return \"I am flying!\"; };\n\nfunction Penguin() { }\nPenguin.prototype = Object.create(Bird.prototype);\nPenguin.prototype.constructor = Penguin;\nPenguin.prototype.fly = () => 'Alas, this is a flightless bird.';\nlet penguin = new Penguin();\nconsole.log(penguin.fly());"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1285,7 +1263,6 @@
"let bird = {\n name: \"Donald\",\n numLegs: 2\n};\n\nlet boat = {\n name: \"Warrior\",\n type: \"race-boat\"\n};\nfunction glideMixin (obj) {\n obj.glide = () => 'Gliding!';\n}\n\nglideMixin(bird);\nglideMixin(boat);"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1345,7 +1322,6 @@
"function Bird() {\n let weight = 15;\n \n this.getWeight = () => weight;\n}"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1391,7 +1367,6 @@
"(function () {\n console.log(\"A cozy nest is ready\");\n})();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1444,7 +1419,6 @@
"const funModule = (function () {\n return {\n isCuteMixin: obj => {\n obj.isCute = () => true;\n },\n singMixin: obj => {\n obj.sing = () => console.log(\"Singing to an awesome tune\");\n }\n };\n})();"
],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},

View File

@ -27,7 +27,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -74,7 +73,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -136,7 +134,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -209,7 +206,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -254,7 +250,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -305,7 +300,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -378,7 +372,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -433,7 +426,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -480,7 +472,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -526,7 +517,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -571,7 +561,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -617,7 +606,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -670,7 +658,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -708,7 +695,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -772,7 +758,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -825,7 +810,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -870,7 +854,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -924,7 +907,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -977,7 +959,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1041,7 +1022,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1105,7 +1085,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1164,7 +1143,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1213,7 +1191,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1262,7 +1239,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1324,7 +1300,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1386,7 +1361,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1444,7 +1418,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1494,7 +1467,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1560,7 +1532,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1636,7 +1607,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1683,7 +1653,6 @@
],
"solutions": [],
"hints": [],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},
@ -1730,7 +1699,6 @@
"hints": [
"You can use .replace() to remove the matched items by replacing them with an empty string."
],
"type": "waypoint",
"releasedOn": "Feb 17, 2017",
"challengeType": 1,
"translations": {},