From 04074fcade166cab393914582cf66907fb12bf91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Djordje=20Lacmanovi=C4=87?= Date: Tue, 4 Aug 2015 16:51:10 +0200 Subject: [PATCH 01/66] fixed issue #1511 - now checking for words longer than 9 chars closes #1511 --- challenges/basic-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index 8d97403e21..8fb64bc1c8 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -231,7 +231,8 @@ "expect(findLongestWord('The quick brown fox jumped over the lazy dog')).to.equal(6);", "expect(findLongestWord('May the force be with you')).to.equal(5);", "expect(findLongestWord('Google do a barrel roll')).to.equal(6);", - "expect(findLongestWord('What is the average airspeed velocity of an unladen swallow')).to.equal(8);" + "expect(findLongestWord('What is the average airspeed velocity of an unladen swallow')).to.equal(8);", + "expect(findLongestWord('What if we try a super-long word such as otorhinolaryngology')).to.equal(19);" ], "MDNlinks": [ "String.split()", From 92091cea968edc8468acec15aacb680dc476bbef Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 5 Aug 2015 15:38:54 +0100 Subject: [PATCH 02/66] Fix some typos --- challenges/basic-javascript.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index ab30786d54..0325880343 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -601,7 +601,7 @@ ], "challengeSeed": [ "var myArray = ['John', 23, ['dog', 3]];", - "var removed = myArray;//This should be ['John'] and myArray should now be ['John', 23]", + "var removed = myArray;//This should be ['John'] and myArray should now be [23, ['dog', 3]]", "", "", "(function(y, z){return('myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z));})(myArray, removed);" @@ -752,7 +752,7 @@ " \"friends\": []", "};", "", - "//Let's add the property age to myDog", + "//Let's add the property bark to myDog", "", "", "//Now delete the property tails", From b6dc52cf08113856241b8dcdd6d9c28210746e22 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 5 Aug 2015 16:54:57 +0100 Subject: [PATCH 03/66] fix https://github.com/FreeCodeCamp/freecodecamp/issues/1559 --- challenges/basic-javascript.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 0325880343..15397ea2f1 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1027,7 +1027,7 @@ ], "tests":[ "assert(test === 2, 'Your RegEx should have found two numbers in the testString');", - "assert(editorValue.match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');" + "assert(editor.getValue().match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');" ], "challengeSeed":[ "var test = (function(){", @@ -1058,7 +1058,7 @@ ], "tests":[ "assert(test === 7, 'Your RegEx should have found seven spaces in the testString');", - "assert(editorValue.match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');" + "assert(editor.getValue().match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');" ], "challengeSeed":[ "var test = (function(){", @@ -1087,7 +1087,7 @@ ], "tests":[ "assert(test === 36, 'Your RegEx should have found seven spaces in the testString');", - "assert(editorValue.match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\S+/gi to find the spaces in the testString');" + "assert(editor.getValue().match(/\\/\\\\S\\/gi/gi), 'You should be using the following expression /\\S+/gi to find the spaces in the testString');" ], "challengeSeed":[ "var test = (function(){", From b6f413e76112911e7b1a1a44dcc9060a9f032dfa Mon Sep 17 00:00:00 2001 From: "Cristian V. Nica" Date: Wed, 5 Aug 2015 19:08:49 +0300 Subject: [PATCH 04/66] Trying to fix issue #1562 In Use Bracket Notation to Find the Nth to Last Character in a String: There is a mistake in the code sample: It should be: var thirdToLastLetterOfFirstName = firstName[firstName.length - 3]; but is: var thirdToLastLetterOfFirstName = firstName[firstName.length - 2]; --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 0325880343..f03ada50f4 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -259,7 +259,7 @@ "challengeSeed": [ "var firstName = \"Madeline\";", "", - "var thirdToLastLetterOfFirstName = firstName[firstName.length - 2];", + "var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];", "", "var lastName = \"Chen\";", "", From a784d9e9601b679e9d33122c7c82c5a383def4a9 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Wed, 5 Aug 2015 17:31:42 +0100 Subject: [PATCH 05/66] Changed the object lessons to use dot notation instead of bracket Fix https://github.com/FreeCodeCamp/freecodecamp/issues/1564 --- challenges/basic-javascript.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 15397ea2f1..84a02c37f1 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -259,7 +259,7 @@ "challengeSeed": [ "var firstName = \"Madeline\";", "", - "var thirdToLastLetterOfFirstName = firstName[firstName.length - 2];", + "var thirdToLastLetterOfFirstName = firstName[firstName.length - 3];", "", "var lastName = \"Chen\";", "", @@ -725,9 +725,9 @@ "", "Now that we have an objects we need to know how to add and remove properties from it", "We add properties to objects like this", - "myObject['myProperty'] = \"myValue\";", + "myObject.myProperty = \"myValue\";", "They can also be deleted like this", - "delete(myObject[\"myProperty\"]);", + "delete(myObject.myProperty);", "Let's add the property bark", "" ], From 688bfd6137b11bb865e8fb7d3ff2d9a4f9586e8f Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 5 Aug 2015 10:47:08 -0700 Subject: [PATCH 06/66] remove comments from migration --- loopbackMigration.js | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/loopbackMigration.js b/loopbackMigration.js index f6b98b8b7b..9754b4f8d9 100644 --- a/loopbackMigration.js +++ b/loopbackMigration.js @@ -38,13 +38,13 @@ function createConnection(URI) { } function createQuery(db, collection, options, batchSize) { - return Rx.Observable.create(function (observer) { + return Rx.Observable.create(function(observer) { var cursor = db.collection(collection).find({}, options); cursor.batchSize(batchSize || 20); // Cursor.each will yield all doc from a batch in the same tick, // or schedule getting next batch on nextTick debug('opening cursor for %s', collection); - cursor.each(function (err, doc) { + cursor.each(function(err, doc) { if (err) { return observer.onError(err); } @@ -55,7 +55,7 @@ function createQuery(db, collection, options, batchSize) { observer.onNext(doc); }); - return Rx.Disposable.create(function () { + return Rx.Disposable.create(function() { debug('closing cursor for %s', collection); cursor.close(); }); @@ -161,33 +161,15 @@ var storyCount = dbObservable }) .count(); -var commentCount = dbObservable - .flatMap(function(db) { - return createQuery(db, 'comments', {}); - }) - .bufferWithCount(20) - .withLatestFrom(dbObservable, function(comments, db) { - return { - comments: comments, - db: db - }; - }) - .flatMap(function(dats) { - return insertMany(dats.db, 'comment', dats.comments, { w: 1 }); - }) - .count(); - Rx.Observable.combineLatest( userIdentityCount, userSavesCount, storyCount, - commentCount, - function(userIdentCount, userCount, storyCount, commentCount) { + function(userIdentCount, userCount, storyCount) { return { userIdentCount: userIdentCount * 20, userCount: userCount * 20, - storyCount: storyCount * 20, - commentCount: commentCount * 20 + storyCount: storyCount * 20 }; }) .subscribe( From 451ddb43a8dfd824010a0cb169db0eb288aedbfa Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 5 Aug 2015 11:22:14 -0700 Subject: [PATCH 07/66] mark if user is github cool during migration --- loopbackMigration.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/loopbackMigration.js b/loopbackMigration.js index 9754b4f8d9..333629438a 100644 --- a/loopbackMigration.js +++ b/loopbackMigration.js @@ -86,13 +86,13 @@ var users = dbObservable .map(function(user) { // flatten user assign(user, user.portfolio, user.profile); - return user; - }) - .map(function(user) { if (user.username) { return user; } user.username = 'fcc' + uuid.v4().slice(0, 8); + if (user.github) { + user.isGithubCool = true; + } return user; }) .shareReplay(); @@ -122,7 +122,7 @@ var userIdentityCount = users return { provider: provider, externalId: user[provider], - userId: user.id + userId: user._id || user.id }; }) .filter(function(ident) { From 367bcdf35ce46122cc1d76b82bd0998694dcc6ee Mon Sep 17 00:00:00 2001 From: "Cristian V. Nica" Date: Wed, 5 Aug 2015 21:55:25 +0300 Subject: [PATCH 08/66] Trying to fix: #1571 I have found a small typo on challenge: An Array Of new Information --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 0325880343..146693deef 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -423,7 +423,7 @@ "description": [ "", "In JavaScript we can store lists or collections of data in what are called arrays", - "Arrays are distinguished by the [ and ] around the data. Each piece of data is separated be a , ", + "Arrays are distinguished by the [ and ] around the data. Each piece of data is separated by a , ", "Now let's create a new array called myArray with a string and a number with a , separating each one", "Refer to the example if you get stuck", "" From 40c371238d0efaa041dbda40af8a765bf16c18c4 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Wed, 5 Aug 2015 11:57:58 -0700 Subject: [PATCH 09/66] new final-ish curriculum structure --- challenges/advanced-bonfires.json | 295 ++----- challenges/angularjs.json | 2 +- .../automated-testing-and-debugging.json | 6 + challenges/basejumps.json | 2 +- challenges/basic-bonfires.json | 815 +----------------- challenges/basic-javascript.json | 2 +- challenges/basic-ziplines.json | 2 +- challenges/expert-bonfires.json | 304 +++++++ challenges/functional-programming.json | 34 - challenges/git.json | 2 +- challenges/intermediate-bonfires.json | 800 +++++++++++++++-- challenges/intermediate-ziplines.json | 2 +- challenges/mongodb.json | 2 +- challenges/nodejs-and-expressjs.json | 2 +- ...-oriented-and-functional-programming.json} | 32 +- 15 files changed, 1155 insertions(+), 1147 deletions(-) create mode 100644 challenges/automated-testing-and-debugging.json create mode 100644 challenges/expert-bonfires.json delete mode 100644 challenges/functional-programming.json rename challenges/{object-oriented-programming.json => object-oriented-and-functional-programming.json} (74%) diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index 7aa5d85777..093580e24f 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -1,55 +1,46 @@ { "name": "Advanced Algorithm Scripting", - "order": 0.011, + "order": 0.010, "challenges": [ { - "id": "aff0395860f5d3034dc0bfc9", - "name": "Bonfire: Validate US Telephone Numbers", - "dashedName": "bonfire-validate-us-telephone-numbers", - "difficulty": "4.01", + "id": "a2f1d72d9b908d0bd72bb9f6", + "name": "Bonfire: Make a Person", + "dashedName": "bonfire-make-a-person", + "difficulty": "3.01", "description": [ - "Return true if the passed string is a valid US phone number", - "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:", - "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555", - "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.", + "Fill in the object constructor with the methods specified in the tests.", + "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).", + "All functions that take an argument have an arity of 1, and the argument will be a string.", + "These methods must be the only available means for interacting with the object.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], - "tests": [ - "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");", - "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"5555555555\"), true);", - "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);", - "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);", - "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);", - "assert.deepEqual(telephoneCheck(\"55555555\"), false);", - "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);", - "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"27576227382\"), false);", - "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);", - "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);", - "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);" - ], "challengeSeed": [ - "function telephoneCheck(str) {", - " // Good luck!", - " return true;", - "}", + "var Person = function(firstAndLast) {", + " return firstAndLast;", + "};", "", - "", - "", - "telephoneCheck(\"555-555-5555\");" + "var bob = new Person('Bob Ross');", + "bob.getFullName();" + ], + "tests": [ + "expect(Object.keys(bob).length).to.eql(6);", + "expect(bob instanceof Person).to.be.true;", + "expect(bob.firstName).to.be.undefined();", + "expect(bob.lastName).to.be.undefined();", + "expect(bob.getFirstName()).to.eql('Bob');", + "expect(bob.getLastName()).to.eql('Ross');", + "expect(bob.getFullName()).to.eql('Bob Ross');", + "bob.setFirstName('Happy');", + "expect(bob.getFirstName()).to.eql('Happy');", + "bob.setLastName('Trees');", + "expect(bob.getLastName()).to.eql('Trees');", + "bob.setFullName('George Carlin');", + "expect(bob.getFullName()).to.eql('George Carlin');", + "bob.setFullName('Bob Ross');" ], "MDNlinks": [ - "RegExp" + "Closures", + "Details of the Object Model" ], "challengeType": 5, "nameCn": "", @@ -64,31 +55,33 @@ "descriptionPt": [] }, { - "id": "a3f503de51cf954ede28891d", - "name": "Bonfire: Symmetric Difference", - "dashedName": "bonfire-symmetric-difference", - "difficulty": "4.02", + "id": "af4afb223120f7348cdfc9fd", + "name": "Bonfire: Map the Debris", + "dashedName": "bonfire-map-the-debris", + "difficulty": "3.02", "description": [ - "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", - "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", + "Return a new array that transforms the element's average altitude into their orbital periods.", + "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", + "You can read about orbital periods on wikipedia.", + "The values should be rounded to the nearest whole number. The body being orbited is Earth.", + "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ - "function sym(args) {", - " return arguments;", + "function orbitalPeriod(arr) {", + " var GM = 398600.4418;", + " var earthRadius = 6367.4447;", + " return arr;", "}", "", - "sym([1, 2, 3], [5, 2, 1, 4]);" + "orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);" ], "tests": [ - "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);", - "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');", - "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');", - "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');" + "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);", + "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" ], "MDNlinks": [ - "Array.reduce()", - "Symmetric Difference" + "Math.pow()" ], "challengeType": 5, "nameCn": "", @@ -103,190 +96,32 @@ "descriptionPt": [] }, { - "id": "aa2e6f85cab2ab736c9a9b24", - "name": "Bonfire: Exact Change", - "dashedName": "bonfire-exact-change", - "difficulty": "4.03", + "id": "a3f503de51cfab748ff001aa", + "name": "Bonfire: Pairwise", + "dashedName": "bonfire-pairwise", + "difficulty": "3.03", "description": [ - "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", - "cid is a 2d array listing available currency.", - "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.", - "Otherwise, return change in coin and bills, sorted in highest to lowest order.", + "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", + "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.", + "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ - "function drawer(price, cash, cid) {", - " var change;", - " // Here is your change, ma'am.", - " return change;", + "function pairwise(arr, arg) {", + " return arg;", "}", "", - "// Example cash-in-drawer array:", - "// [['PENNY', 1.01],", - "// ['NICKEL', 2.05],", - "// ['DIME', 3.10],", - "// ['QUARTER', 4.25],", - "// ['ONE', 90.00],", - "// ['FIVE', 55.00],", - "// ['TEN', 20.00],", - "// ['TWENTY', 60.00],", - "// ['ONE HUNDRED', 100.00]]", - "", - "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);" + "pairwise([1,4,2,3,0,5], 7);" ], "tests": [ - "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');", - "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", - "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');", - "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');" + "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);", + "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);", + "expect(pairwise([1,1,1], 2)).to.equal(1);", + "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);", + "expect(pairwise([], 100)).to.equal(0);" ], "MDNlinks": [ - "Global Object" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a56138aff60341a09ed6c480", - "name": "Bonfire: Inventory Update", - "dashedName": "bonfire-inventory-update", - "difficulty": "4.04", - "description": [ - "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function inventory(arr1, arr2) {", - " // All inventory must be accounted for or you're fired!", - " return arr1;", - "}", - "", - "// Example inventory lists", - "var curInv = [", - " [21, 'Bowling Ball'],", - " [2, 'Dirty Sock'],", - " [1, 'Hair Pin'],", - " [5, 'Microphone']", - "];", - "", - "var newInv = [", - " [2, 'Hair Pin'],", - " [3, 'Half-Eaten Apple'],", - " [67, 'Bowling Ball'],", - " [7, 'Toothpaste']", - "];", - "", - "inventory(curInv, newInv);" - ], - "tests": [ - "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');", - "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);", - "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);", - "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);" - ], - "MDNlinks": [ - "Global Array Object" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a7bf700cd123b9a54eef01d5", - "name": "Bonfire: No repeats please", - "dashedName": "bonfire-no-repeats-please", - "difficulty": "4.05", - "description": [ - "Return the number of total permutations of the provided string that don't have repeated consecutive letters.", - "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function permAlone(str) {", - " return str;", - "}", - "", - "permAlone('aab');" - ], - "tests": [ - "expect(permAlone('aab')).to.be.a('number');", - "expect(permAlone('aab')).to.equal(2);", - "expect(permAlone('aaa')).to.equal(0);", - "expect(permAlone('aabb')).to.equal(8);", - "expect(permAlone('abcdefa')).to.equal(3600);", - "expect(permAlone('abfdefa')).to.equal(2640);", - "expect(permAlone('zzzzzzzz')).to.equal(0);" - ], - "MDNlinks": [ - "Permutations", - "RegExp" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a19f0fbe1872186acd434d5a", - "name": "Bonfire: Friendly Date Ranges", - "dashedName": "bonfire-friendly-date-ranges", - "difficulty": "4.06", - "description": [ - "Implement a way of converting two dates into a more friendly date range that could be presented to a user.", - "It must not show any redundant information in the date range.", - "For example, if the year and month are the same then only the day range should be displayed.", - "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.", - "Input date is formatted as YYYY-MM-DD", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function friendly(str) {", - " return str;", - "}", - "", - "friendly(['2015-07-01', '2015-07-04']);" - ], - "tests": [ - "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');", - "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');", - "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);", - "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');", - "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');", - "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);" - ], - "MDNlinks": [ - "String.split()", - "String.substr()", - "parseInt()" + "Array.reduce()" ], "challengeType": 5, "nameCn": "", diff --git a/challenges/angularjs.json b/challenges/angularjs.json index 48207fb41f..0e1b5acc32 100644 --- a/challenges/angularjs.json +++ b/challenges/angularjs.json @@ -1,6 +1,6 @@ { "name": "AngularJS", - "order": 0.015, + "order": 0.016, "challenges": [ { "id": "bd7154d8c441eddfaeb5bdef", diff --git a/challenges/automated-testing-and-debugging.json b/challenges/automated-testing-and-debugging.json new file mode 100644 index 0000000000..b19438acec --- /dev/null +++ b/challenges/automated-testing-and-debugging.json @@ -0,0 +1,6 @@ +{ + "name": "Automated Testing and Debugging - Coming Soon", + "order": 0.011, + "challenges": [ + ] +} diff --git a/challenges/basejumps.json b/challenges/basejumps.json index 717a99a47d..44d406797c 100644 --- a/challenges/basejumps.json +++ b/challenges/basejumps.json @@ -1,6 +1,6 @@ { "name": "Full Stack JavaScript Projects", - "order": 0.017, + "order": 0.018, "challenges": [ { "id": "bd7158d8c443eddfaeb5bcef", diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index 8d97403e21..c2f19318e1 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -1,13 +1,15 @@ { "name": "Basic Algorithm Scripting", - "order": 0.007, + "order": 0.006, "challenges": [ { "id": "bd7139d8c441eddfaeb5bdef", "name": "Waypoint: Pair Program on Bonfires", "dashedName": "waypoint-pair-program-on-bonfires", "difficulty": 0.44, - "challengeSeed": ["119657641"], + "challengeSeed": [ + "119657641" + ], "description": [ "Please note that the video for this challenge is a little outdated, and doesn't perfectly match these steps. We plan to record a new video soon.", "OK, we're finally ready to start pair programming!", @@ -715,815 +717,6 @@ "descriptionEs": [], "namePt": "", "descriptionPt": [] - }, - { - "id": "a3566b1109230028080c9345", - "name": "Bonfire: Sum All Numbers in a Range", - "dashedName": "bonfire-sum-all-numbers-in-a-range", - "difficulty": "2.00", - "description": [ - "We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.", - "The lowest number will not always come first.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function sumAll(arr) {", - " return(1);", - "}", - "", - "sumAll([1, 4]);" - ], - "tests": [ - "expect(sumAll([1, 4])).to.be.a('Number');", - "expect(sumAll([1, 4])).to.equal(10);", - "expect(sumAll([4, 1])).to.equal(10);", - "expect(sumAll([5, 10])).to.equal(45);", - "expect(sumAll([10, 5])).to.equal(45);" - ], - "MDNlinks": [ - "Math.max()", - "Math.min()", - "Array.reduce()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a5de63ebea8dbee56860f4f2", - "name": "Bonfire: Diff Two Arrays", - "dashedName": "bonfire-diff-two-arrays", - "difficulty": "2.01", - "description": [ - "Compare two arrays and return a new array with any items not found in both of the original arrays.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function diff(arr1, arr2) {", - " var newArr = [];", - " // Same, same; but different.", - " return newArr;", - "}", - "", - "diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);" - ], - "tests": [ - "expect(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])).to.be.a('array');", - "assert.deepEqual(diff(['diorite', 'andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['pink wool'], 'arrays with only one difference');", - "assert.includeMembers(diff(['andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['diorite', 'pink wool'], 'arrays with more than one difference');", - "assert.deepEqual(diff(['andesite', 'grass', 'dirt', 'dead shrub'], ['andesite', 'grass', 'dirt', 'dead shrub']), [], 'arrays with no difference');", - "assert.deepEqual(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], 'arrays with numbers');", - "assert.includeMembers(diff([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), ['piglet', 4], 'arrays with numbers and strings');", - "assert.deepEqual(diff([], ['snuffleupagus', 'cookie monster', 'elmo']), ['snuffleupagus', 'cookie monster', 'elmo'], 'empty array');" - ], - "MDNlinks": [ - "Comparison Operators", - "String.slice()", - "Array.filter()", - "Array.indexOf()", - "String.concat()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a7f4d8f2483413a6ce226cac", - "name": "Bonfire: Roman Numeral Converter", - "dashedName": "bonfire-roman-numeral-converter", - "tests": [ - "expect(convert(12)).to.equal(\"XII\");", - "expect(convert(5)).to.equal(\"V\");", - "expect(convert(9)).to.equal(\"IX\");", - "expect(convert(29)).to.equal(\"XXIX\");", - "expect(convert(16)).to.equal(\"XVI\");" - ], - "difficulty": "2.02", - "description": [ - "Convert the given number into a roman numeral.", - "All roman numerals answers should be provided in upper-case.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function convert(num) {", - " return num;", - "}", - "", - "convert(36);" - ], - "MDNlinks": [ - "Array.splice()", - "Array.indexOf()", - "Array.join()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a0b5010f579e69b815e7c5d6", - "name": "Bonfire: Search and Replace", - "dashedName": "bonfire-search-and-replace", - "tests": [ - "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");", - "expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");", - "expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");", - "expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");", - "expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");" - ], - "difficulty": "2.03", - "description": [ - "Perform a search and replace on the sentence using the arguments provided and return the new sentence.", - "First argument is the sentence to perform the search and replace on.", - "Second argument is the word that you will be replacing (before).", - "Third argument is what you will be replacing the second argument with (after).", - "NOTE: Preserve the case of the original word when you are replacing it. For example if you mean to replace the word 'Book' with the word 'dog', it should be replaced as 'Dog'", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function replace(str, before, after) {", - " return str;", - "}", - "", - "replace(\"A quick brown fox jumped over the lazy dog\", \"jumped\", \"leaped\");" - ], - "MDNlinks": [ - "Array.splice()", - "String.replace()", - "Array.join()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "aa7697ea2477d1316795783b", - "name": "Bonfire: Pig Latin", - "dashedName": "bonfire-pig-latin", - "tests": [ - "expect(translate(\"california\")).to.equal(\"aliforniacay\");", - "expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");", - "expect(translate(\"glove\")).to.equal(\"oveglay\");", - "expect(translate(\"algorithm\")).to.equal(\"algorithmway\");", - "expect(translate(\"eight\")).to.equal(\"eightway\");" - ], - "difficulty": "2.04", - "description": [ - "Translate the provided string to pig latin.", - "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", - "If a word begins with a vowel you just add \"way\" to the end.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function translate(str) {", - " return str;", - "}", - "", - "translate(\"consonant\");" - ], - "MDNlinks": [ - "Array.indexOf()", - "Array.push()", - "Array.join()", - "String.substr()", - "String.split()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "afd15382cdfb22c9efe8b7de", - "name": "Bonfire: DNA Pairing", - "dashedName": "bonfire-dna-pairing", - "tests": [ - "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'should return the dna pair');", - "assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'should return the dna pair');", - "assert.deepEqual(pair(\"CTCTA\"),[['C','G'],['T','A'],['C','G'],['T','A'],['A','T']], 'should return the dna pair');" - ], - "difficulty": "2.05", - "description": [ - "The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.", - "Base pairs are a pair of AT and CG. Match the missing element to the provided character.", - "Return the provided character as the first element in each array.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function pair(str) {", - " return str;", - "}", - "", - "pair(\"GCG\");" - ], - "MDNlinks": [ - "Array.push()", - "String.split()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "af7588ade1100bde429baf20", - "name": "Bonfire: Missing letters", - "dashedName": "bonfire-missing-letters", - "difficulty": "2.05", - "description": [ - "Find the missing letter in the passed letter range and return it.", - "If all letters are present in the range, return undefined.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function fearNotLetter(str) {", - " return str;", - "}", - "", - "fearNotLetter('abce');" - ], - "tests": [ - "expect(fearNotLetter('abce')).to.equal('d');", - "expect(fearNotLetter('bcd')).to.be.undefined;", - "expect(fearNotLetter('abcdefghjklmno')).to.equal('i');", - "expect(fearNotLetter('yz')).to.be.undefined;" - ], - "MDNlinks": [ - "String.charCodeAt()", - "String.fromCharCode()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a77dbc43c33f39daa4429b4f", - "name": "Bonfire: Boo who", - "dashedName": "bonfire-boo-who", - "difficulty": "2.06", - "description": [ - "Check if a value is classified as a boolean primitive. Return true or false.", - "Boolean primitives are true and false.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function boo(bool) {", - " // What is the new fad diet for ghost developers? The Boolean.", - " return bool;", - "}", - "", - "boo(null);" - ], - "tests": [ - "assert.strictEqual(boo(true), true);", - "assert.strictEqual(boo(false), true);", - "assert.strictEqual(boo([1, 2, 3]), false);", - "assert.strictEqual(boo([].slice), false);", - "assert.strictEqual(boo({ 'a': 1 }), false);", - "assert.strictEqual(boo(1), false);", - "assert.strictEqual(boo(NaN), false);", - "assert.strictEqual(boo('a'), false);" - ], - "MDNlinks": [ - "Boolean Objects" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a105e963526e7de52b219be9", - "name": "Bonfire: Sorted Union", - "dashedName": "bonfire-sorted-union", - "difficulty": "2.07", - "description": [ - "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.", - "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.", - "The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.", - "Check the assertion tests for examples.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function unite(arr1, arr2, arr3) {", - " return arr1;", - "}", - "", - "unite([1, 2, 3], [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');" - ], - "MDNlinks": [ - "Arguments object", - "Array.reduce()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a6b0bb188d873cb2c8729495", - "name": "Bonfire: Convert HTML Entities", - "dashedName": "bonfire-convert-html-entities", - "difficulty": "2.07", - "description": [ - "Convert the characters \"&\", \"<\", \">\", '\"' (double quote), and \"'\" (apostrophe), in a string to their corresponding HTML entities.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function convert(str) {", - " // :)", - " return str;", - "}", - "", - "convert('Dolce & Gabbana');" - ], - "tests": [ - "assert.strictEqual(convert('Dolce & Gabbana'), 'Dolce & Gabbana', 'should escape characters');", - "assert.strictEqual(convert('Hamburgers < Pizza < Tacos'), 'Hamburgers < Pizza < Tacos', 'should escape characters');", - "assert.strictEqual(convert('Sixty > twelve'), 'Sixty > twelve', 'should escape characters');", - "assert.strictEqual(convert('Stuff in \"quotation marks\"'), 'Stuff in "quotation marks"', 'should escape characters');", - "assert.strictEqual(convert(\"Shindler's List\"), 'Shindler's List', 'should escape characters');", - "assert.strictEqual(convert('<>'), '<>', 'should escape characters');", - "assert.strictEqual(convert('abc'), 'abc', 'should handle strings with nothing to escape');" - ], - "MDNlinks": [ - "RegExp", - "HTML Entities" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a103376db3ba46b2d50db289", - "name": "Bonfire: Spinal Tap Case", - "dashedName": "bonfire-spinal-tap-case", - "difficulty": "2.08", - "description": [ - "Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function spinalCase(str) {", - " // \"It's such a fine line between stupid, and clever.\"", - " // --David St. Hubbins", - " return str;", - "}", - "", - "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');" - ], - "MDNlinks": [ - "RegExp", - "String.replace()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a5229172f011153519423690", - "name": "Bonfire: Sum All Odd Fibonacci Numbers", - "dashedName": "bonfire-sum-all-odd-fibonacci-numbers", - "difficulty": "2.09", - "description": [ - "Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.", - "The first few numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8, and each subsequent number is the sum of the previous two numbers.", - "As an example, passing 4 to the function should return 5 because all the odd Fibonacci numbers under 4 are 1, 1, and 3.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function sumFibs(num) {", - " return num;", - "}", - "", - "sumFibs(4);" - ], - "tests": [ - "expect(sumFibs(1)).to.be.a('number');", - "expect(sumFibs(1000)).to.equal(1785);", - "expect(sumFibs(4000000)).to.equal(4613732);", - "expect(sumFibs(4)).to.equal(5);", - "expect(sumFibs(75024)).to.equal(60696);", - "expect(sumFibs(75025)).to.equal(135721);" - ], - "MDNlinks": [ - "Remainder" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a3bfc1673c0526e06d3ac698", - "name": "Bonfire: Sum All Primes", - "dashedName": "bonfire-sum-all-primes", - "difficulty": "2.10", - "description": [ - "Sum all the prime numbers up to and including the provided number.", - "A prime number is defined as having only two divisors, 1 and itself. For example, 2 is a prime number because it's only divisible by 1 and 2. 1 isn't a prime number, because it's only divisible by itself.", - "The provided number may not be a prime.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function sumPrimes(num) {", - " return num;", - "}", - "", - "sumPrimes(10);" - ], - "tests": [ - "expect(sumPrimes(10)).to.be.a('number');", - "expect(sumPrimes(10)).to.equal(17);", - "expect(sumPrimes(977)).to.equal(73156);" - ], - "MDNlinks": [ - "For Loops", - "Array.push()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "ae9defd7acaf69703ab432ea", - "name": "Bonfire: Smallest Common Multiple", - "dashedName": "bonfire-smallest-common-multiple", - "difficulty": "2.11", - "description": [ - "Find the smallest number that is evenly divisible by all numbers in the provided range.", - "The range will be an array of two numbers that will not necessarily be in numerical order.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function smallestCommons(arr) {", - " return arr;", - "}", - "", - "", - "smallestCommons([1,5]);" - ], - "tests": [ - "expect(smallestCommons([1,5])).to.be.a('number');", - "expect(smallestCommons([1,5])).to.equal(60);", - "expect(smallestCommons([5,1])).to.equal(60);", - "expect(smallestCommons([1,13])).to.equal(360360);" - ], - "MDNlinks": [ - "Smallest Common Multiple" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a6e40f1041b06c996f7b2406", - "name": "Bonfire: Finders Keepers", - "dashedName": "bonfire-finders-keepers", - "difficulty": "2.12", - "description": [ - "Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument).", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function find(arr, func) {", - " var num = 0;", - " return num;", - "}", - "", - "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');" - ], - "MDNlinks": [ - "Array.some()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a5deed1811a43193f9f1c841", - "name": "Bonfire: Drop it", - "dashedName": "bonfire-drop-it", - "difficulty": "2.13", - "description": [ - "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function drop(arr, func) {", - " // Drop them elements.", - " return arr;", - "}", - "", - "drop([1, 2, 3], function(n) {return n < 3; });" - ], - "tests": [ - "expect(drop([1, 2, 3, 4], function(n) {return n >= 3; })).to.eqls([3, 4]);", - "expect(drop([1, 2, 3], function(n) {return n > 0; })).to.eqls([1, 2, 3]);", - "expect(drop([1, 2, 3, 4], function(n) {return n > 5; })).to.eqls([]);" - ], - "MDNlinks": [ - "Arguments object", - "Array.shift()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "ab306dbdcc907c7ddfc30830", - "name": "Bonfire: Steamroller", - "dashedName": "bonfire-steamroller", - "difficulty": "2.14", - "description": [ - "Flatten a nested array. You must account for varying levels of nesting.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function steamroller(arr) {", - " // I'm a steamroller, baby", - " return arr;", - "}", - "", - "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');" - ], - "MDNlinks": [ - "Array.isArray()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a8d97bd4c764e91f9d2bda01", - "name": "Bonfire: Binary Agents", - "dashedName": "bonfire-binary-agents", - "difficulty": "2.15", - "description": [ - "Return an English translated sentence of the passed binary string.", - "The binary string will be space separated.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function binaryAgent(str) {", - " return str;", - "}", - "", - "binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');" - ], - "tests": [ - "expect(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111')).to.equal(\"Aren't bonfires fun!?\");", - "expect(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001')).to.equal(\"I love FreeCodeCamp!\");" - ], - "MDNlinks": [ - "String.charCodeAt()", - "String.fromCharCode()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a10d2431ad0c6a099a4b8b52", - "name": "Bonfire: Everything Be True", - "dashedName": "bonfire-everything-be-true", - "difficulty": "2.21", - "description": [ - "Check if the predicate (second argument) returns truthy (defined) for all elements of a collection (first argument).", - "For this, check to see if the property defined in the second argument is present on every element of the collection.", - "Remember, you can access object properties through either dot notation or [] notation.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function every(collection, pre) {", - " // Does everyone have one of these?", - " return pre;", - "}", - "", - "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');" - - ], - "MDNlinks": [ - "Object.hasOwnProperty()", - "Object.getOwnPropertyNames()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a97fd23d9b809dac9921074f", - "name": "Bonfire: Arguments Optional", - "dashedName": "bonfire-arguments-optional", - "difficulty": "2.22", - "description": [ - "Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.", - "For example, add(2, 3) should return 5, and add(2) should return a function that is waiting for an argument so that var sum2And = add(2); return sum2And(3); // 5", - "If either argument isn't a valid number, return undefined.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function add() {", - " return false;", - "}", - "", - "add(2,3);" - ], - "tests": [ - "expect(add(2, 3)).to.equal(5);", - "expect(add(2)(3)).to.equal(5);", - "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;", - "expect(add(2, '3')).to.be.undefined;", - "expect(add(2)([3])).to.be.undefined;" - ], - "MDNlinks": [ - "Global Function Object", - "Arguments object" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] } ] } diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index ab30786d54..42233ed0e6 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1,6 +1,6 @@ { "name": "Basic JavaScript", - "order": 0.006, + "order": 0.005, "challenges": [ { "id":"bd7123c9c441eddfaeb4bdef", diff --git a/challenges/basic-ziplines.json b/challenges/basic-ziplines.json index 23306c1ba1..cb4f9bd8a5 100644 --- a/challenges/basic-ziplines.json +++ b/challenges/basic-ziplines.json @@ -1,6 +1,6 @@ { "name": "Basic Front End Development Projects", - "order": 0.006, + "order": 0.007, "challenges": [ { "id": "bd7158d8c442eddfbeb5bd1f", diff --git a/challenges/expert-bonfires.json b/challenges/expert-bonfires.json new file mode 100644 index 0000000000..2cf00386a5 --- /dev/null +++ b/challenges/expert-bonfires.json @@ -0,0 +1,304 @@ +{ + "name": "Expert Algorithm Scripting", + "order": 0.012, + "challenges": [ + { + "id": "aff0395860f5d3034dc0bfc9", + "name": "Bonfire: Validate US Telephone Numbers", + "dashedName": "bonfire-validate-us-telephone-numbers", + "difficulty": "4.01", + "description": [ + "Return true if the passed string is a valid US phone number", + "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:", + "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555", + "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "tests": [ + "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");", + "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"5555555555\"), true);", + "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);", + "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);", + "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);", + "assert.deepEqual(telephoneCheck(\"55555555\"), false);", + "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);", + "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"27576227382\"), false);", + "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);", + "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);", + "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);" + ], + "challengeSeed": [ + "function telephoneCheck(str) {", + " // Good luck!", + " return true;", + "}", + "", + "", + "", + "telephoneCheck(\"555-555-5555\");" + ], + "MDNlinks": [ + "RegExp" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a3f503de51cf954ede28891d", + "name": "Bonfire: Symmetric Difference", + "dashedName": "bonfire-symmetric-difference", + "difficulty": "4.02", + "description": [ + "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", + "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function sym(args) {", + " return arguments;", + "}", + "", + "sym([1, 2, 3], [5, 2, 1, 4]);" + ], + "tests": [ + "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);", + "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');", + "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');", + "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');" + ], + "MDNlinks": [ + "Array.reduce()", + "Symmetric Difference" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "aa2e6f85cab2ab736c9a9b24", + "name": "Bonfire: Exact Change", + "dashedName": "bonfire-exact-change", + "difficulty": "4.03", + "description": [ + "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", + "cid is a 2d array listing available currency.", + "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.", + "Otherwise, return change in coin and bills, sorted in highest to lowest order.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function drawer(price, cash, cid) {", + " var change;", + " // Here is your change, ma'am.", + " return change;", + "}", + "", + "// Example cash-in-drawer array:", + "// [['PENNY', 1.01],", + "// ['NICKEL', 2.05],", + "// ['DIME', 3.10],", + "// ['QUARTER', 4.25],", + "// ['ONE', 90.00],", + "// ['FIVE', 55.00],", + "// ['TEN', 20.00],", + "// ['TWENTY', 60.00],", + "// ['ONE HUNDRED', 100.00]]", + "", + "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);" + ], + "tests": [ + "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');", + "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", + "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');", + "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');" + ], + "MDNlinks": [ + "Global Object" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a56138aff60341a09ed6c480", + "name": "Bonfire: Inventory Update", + "dashedName": "bonfire-inventory-update", + "difficulty": "4.04", + "description": [ + "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function inventory(arr1, arr2) {", + " // All inventory must be accounted for or you're fired!", + " return arr1;", + "}", + "", + "// Example inventory lists", + "var curInv = [", + " [21, 'Bowling Ball'],", + " [2, 'Dirty Sock'],", + " [1, 'Hair Pin'],", + " [5, 'Microphone']", + "];", + "", + "var newInv = [", + " [2, 'Hair Pin'],", + " [3, 'Half-Eaten Apple'],", + " [67, 'Bowling Ball'],", + " [7, 'Toothpaste']", + "];", + "", + "inventory(curInv, newInv);" + ], + "tests": [ + "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');", + "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);", + "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);", + "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);", + "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);", + "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);" + ], + "MDNlinks": [ + "Global Array Object" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a7bf700cd123b9a54eef01d5", + "name": "Bonfire: No repeats please", + "dashedName": "bonfire-no-repeats-please", + "difficulty": "4.05", + "description": [ + "Return the number of total permutations of the provided string that don't have repeated consecutive letters.", + "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function permAlone(str) {", + " return str;", + "}", + "", + "permAlone('aab');" + ], + "tests": [ + "expect(permAlone('aab')).to.be.a('number');", + "expect(permAlone('aab')).to.equal(2);", + "expect(permAlone('aaa')).to.equal(0);", + "expect(permAlone('aabb')).to.equal(8);", + "expect(permAlone('abcdefa')).to.equal(3600);", + "expect(permAlone('abfdefa')).to.equal(2640);", + "expect(permAlone('zzzzzzzz')).to.equal(0);" + ], + "MDNlinks": [ + "Permutations", + "RegExp" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a19f0fbe1872186acd434d5a", + "name": "Bonfire: Friendly Date Ranges", + "dashedName": "bonfire-friendly-date-ranges", + "difficulty": "4.06", + "description": [ + "Implement a way of converting two dates into a more friendly date range that could be presented to a user.", + "It must not show any redundant information in the date range.", + "For example, if the year and month are the same then only the day range should be displayed.", + "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.", + "Input date is formatted as YYYY-MM-DD", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function friendly(str) {", + " return str;", + "}", + "", + "friendly(['2015-07-01', '2015-07-04']);" + ], + "tests": [ + "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');", + "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');", + "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);", + "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');", + "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');", + "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);" + ], + "MDNlinks": [ + "String.split()", + "String.substr()", + "parseInt()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + } + ] +} diff --git a/challenges/functional-programming.json b/challenges/functional-programming.json deleted file mode 100644 index 467be534e9..0000000000 --- a/challenges/functional-programming.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "Functional Programming", - "order": 0.010, - "challenges": [ - { - "id": "bd7129d8c441eddfbeb5bddf", - "name": "Waypoint: Practice Functional Programming", - "dashedName": "waypoint-practice-functional-programming", - "difficulty": 0.01, - "challengeSeed": ["129169463"], - "description": [ - "Functional programming holds the key to unlocking JavaScript's powerful asynchronous features.", - "Jafar Husain's interactive Functional Programming course will familiarize you with the various ways you can recombine these functions.", - "Functional programming in JavaScript involves using five key functions: \"map\", \"reduce\", \"filter\", \"concatAll\", and \"zip\".", - "Click here to go to the challenge: http://jhusain.github.io/learnrx/.", - "You only need to complete the first 27 steps of this tutorial.", - "This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.", - "If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - } - ] -} diff --git a/challenges/git.json b/challenges/git.json index 025ab49029..1d1ac9e1c5 100644 --- a/challenges/git.json +++ b/challenges/git.json @@ -1,6 +1,6 @@ { "name": "Git", - "order" : 0.012, + "order" : 0.013, "challenges": [ { "id": "bd7353d8c341eddeaeb5bd0f", diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index f130dc92c6..5ae11fc7a4 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -1,46 +1,35 @@ { "name": "Intermediate Algorithm Scripting", - "order": 0.009, + "order": 0.008, "challenges": [ { - "id": "a2f1d72d9b908d0bd72bb9f6", - "name": "Bonfire: Make a Person", - "dashedName": "bonfire-make-a-person", - "difficulty": "3.01", + "id": "a3566b1109230028080c9345", + "name": "Bonfire: Sum All Numbers in a Range", + "dashedName": "bonfire-sum-all-numbers-in-a-range", + "difficulty": "2.00", "description": [ - "Fill in the object constructor with the methods specified in the tests.", - "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).", - "All functions that take an argument have an arity of 1, and the argument will be a string.", - "These methods must be the only available means for interacting with the object.", + "We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.", + "The lowest number will not always come first.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ - "var Person = function(firstAndLast) {", - " return firstAndLast;", - "};", + "function sumAll(arr) {", + " return(1);", + "}", "", - "var bob = new Person('Bob Ross');", - "bob.getFullName();" + "sumAll([1, 4]);" ], "tests": [ - "expect(Object.keys(bob).length).to.eql(6);", - "expect(bob instanceof Person).to.be.true;", - "expect(bob.firstName).to.be.undefined();", - "expect(bob.lastName).to.be.undefined();", - "expect(bob.getFirstName()).to.eql('Bob');", - "expect(bob.getLastName()).to.eql('Ross');", - "expect(bob.getFullName()).to.eql('Bob Ross');", - "bob.setFirstName('Happy');", - "expect(bob.getFirstName()).to.eql('Happy');", - "bob.setLastName('Trees');", - "expect(bob.getLastName()).to.eql('Trees');", - "bob.setFullName('George Carlin');", - "expect(bob.getFullName()).to.eql('George Carlin');", - "bob.setFullName('Bob Ross');" + "expect(sumAll([1, 4])).to.be.a('Number');", + "expect(sumAll([1, 4])).to.equal(10);", + "expect(sumAll([4, 1])).to.equal(10);", + "expect(sumAll([5, 10])).to.equal(45);", + "expect(sumAll([10, 5])).to.equal(45);" ], "MDNlinks": [ - "Closures", - "Details of the Object Model" + "Math.max()", + "Math.min()", + "Array.reduce()" ], "challengeType": 5, "nameCn": "", @@ -55,33 +44,530 @@ "descriptionPt": [] }, { - "id": "af4afb223120f7348cdfc9fd", - "name": "Bonfire: Map the Debris", - "dashedName": "bonfire-map-the-debris", - "difficulty": "3.02", + "id": "a5de63ebea8dbee56860f4f2", + "name": "Bonfire: Diff Two Arrays", + "dashedName": "bonfire-diff-two-arrays", + "difficulty": "2.01", "description": [ - "Return a new array that transforms the element's average altitude into their orbital periods.", - "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", - "You can read about orbital periods on wikipedia.", - "The values should be rounded to the nearest whole number. The body being orbited is Earth.", - "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418", + "Compare two arrays and return a new array with any items not found in both of the original arrays.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ - "function orbitalPeriod(arr) {", - " var GM = 398600.4418;", - " var earthRadius = 6367.4447;", + "function diff(arr1, arr2) {", + " var newArr = [];", + " // Same, same; but different.", + " return newArr;", + "}", + "", + "diff([1, 2, 3, 5], [1, 2, 3, 4, 5]);" + ], + "tests": [ + "expect(diff([1, 2, 3, 5], [1, 2, 3, 4, 5])).to.be.a('array');", + "assert.deepEqual(diff(['diorite', 'andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['pink wool'], 'arrays with only one difference');", + "assert.includeMembers(diff(['andesite', 'grass', 'dirt', 'pink wool', 'dead shrub'], ['diorite', 'andesite', 'grass', 'dirt', 'dead shrub']), ['diorite', 'pink wool'], 'arrays with more than one difference');", + "assert.deepEqual(diff(['andesite', 'grass', 'dirt', 'dead shrub'], ['andesite', 'grass', 'dirt', 'dead shrub']), [], 'arrays with no difference');", + "assert.deepEqual(diff([1, 2, 3, 5], [1, 2, 3, 4, 5]), [4], 'arrays with numbers');", + "assert.includeMembers(diff([1, 'calf', 3, 'piglet'], [1, 'calf', 3, 4]), ['piglet', 4], 'arrays with numbers and strings');", + "assert.deepEqual(diff([], ['snuffleupagus', 'cookie monster', 'elmo']), ['snuffleupagus', 'cookie monster', 'elmo'], 'empty array');" + ], + "MDNlinks": [ + "Comparison Operators", + "String.slice()", + "Array.filter()", + "Array.indexOf()", + "String.concat()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a7f4d8f2483413a6ce226cac", + "name": "Bonfire: Roman Numeral Converter", + "dashedName": "bonfire-roman-numeral-converter", + "tests": [ + "expect(convert(12)).to.equal(\"XII\");", + "expect(convert(5)).to.equal(\"V\");", + "expect(convert(9)).to.equal(\"IX\");", + "expect(convert(29)).to.equal(\"XXIX\");", + "expect(convert(16)).to.equal(\"XVI\");" + ], + "difficulty": "2.02", + "description": [ + "Convert the given number into a roman numeral.", + "All roman numerals answers should be provided in upper-case.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function convert(num) {", + " return num;", + "}", + "", + "convert(36);" + ], + "MDNlinks": [ + "Array.splice()", + "Array.indexOf()", + "Array.join()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a0b5010f579e69b815e7c5d6", + "name": "Bonfire: Search and Replace", + "dashedName": "bonfire-search-and-replace", + "tests": [ + "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");", + "expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");", + "expect(replace(\"This has a spellngi error\", \"spellngi\", \"spelling\")).to.equal(\"This has a spelling error\");", + "expect(replace(\"His name is Tom\", \"Tom\", \"john\")).to.equal(\"His name is John\");", + "expect(replace(\"Let us get back to more Coding\", \"Coding\", \"bonfires\")).to.equal(\"Let us get back to more Bonfires\");" + ], + "difficulty": "2.03", + "description": [ + "Perform a search and replace on the sentence using the arguments provided and return the new sentence.", + "First argument is the sentence to perform the search and replace on.", + "Second argument is the word that you will be replacing (before).", + "Third argument is what you will be replacing the second argument with (after).", + "NOTE: Preserve the case of the original word when you are replacing it. For example if you mean to replace the word 'Book' with the word 'dog', it should be replaced as 'Dog'", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function replace(str, before, after) {", + " return str;", + "}", + "", + "replace(\"A quick brown fox jumped over the lazy dog\", \"jumped\", \"leaped\");" + ], + "MDNlinks": [ + "Array.splice()", + "String.replace()", + "Array.join()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "aa7697ea2477d1316795783b", + "name": "Bonfire: Pig Latin", + "dashedName": "bonfire-pig-latin", + "tests": [ + "expect(translate(\"california\")).to.equal(\"aliforniacay\");", + "expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");", + "expect(translate(\"glove\")).to.equal(\"oveglay\");", + "expect(translate(\"algorithm\")).to.equal(\"algorithmway\");", + "expect(translate(\"eight\")).to.equal(\"eightway\");" + ], + "difficulty": "2.04", + "description": [ + "Translate the provided string to pig latin.", + "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", + "If a word begins with a vowel you just add \"way\" to the end.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function translate(str) {", + " return str;", + "}", + "", + "translate(\"consonant\");" + ], + "MDNlinks": [ + "Array.indexOf()", + "Array.push()", + "Array.join()", + "String.substr()", + "String.split()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "afd15382cdfb22c9efe8b7de", + "name": "Bonfire: DNA Pairing", + "dashedName": "bonfire-dna-pairing", + "tests": [ + "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'should return the dna pair');", + "assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'should return the dna pair');", + "assert.deepEqual(pair(\"CTCTA\"),[['C','G'],['T','A'],['C','G'],['T','A'],['A','T']], 'should return the dna pair');" + ], + "difficulty": "2.05", + "description": [ + "The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.", + "Base pairs are a pair of AT and CG. Match the missing element to the provided character.", + "Return the provided character as the first element in each array.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function pair(str) {", + " return str;", + "}", + "", + "pair(\"GCG\");" + ], + "MDNlinks": [ + "Array.push()", + "String.split()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "af7588ade1100bde429baf20", + "name": "Bonfire: Missing letters", + "dashedName": "bonfire-missing-letters", + "difficulty": "2.05", + "description": [ + "Find the missing letter in the passed letter range and return it.", + "If all letters are present in the range, return undefined.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function fearNotLetter(str) {", + " return str;", + "}", + "", + "fearNotLetter('abce');" + ], + "tests": [ + "expect(fearNotLetter('abce')).to.equal('d');", + "expect(fearNotLetter('bcd')).to.be.undefined;", + "expect(fearNotLetter('abcdefghjklmno')).to.equal('i');", + "expect(fearNotLetter('yz')).to.be.undefined;" + ], + "MDNlinks": [ + "String.charCodeAt()", + "String.fromCharCode()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a77dbc43c33f39daa4429b4f", + "name": "Bonfire: Boo who", + "dashedName": "bonfire-boo-who", + "difficulty": "2.06", + "description": [ + "Check if a value is classified as a boolean primitive. Return true or false.", + "Boolean primitives are true and false.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function boo(bool) {", + " // What is the new fad diet for ghost developers? The Boolean.", + " return bool;", + "}", + "", + "boo(null);" + ], + "tests": [ + "assert.strictEqual(boo(true), true);", + "assert.strictEqual(boo(false), true);", + "assert.strictEqual(boo([1, 2, 3]), false);", + "assert.strictEqual(boo([].slice), false);", + "assert.strictEqual(boo({ 'a': 1 }), false);", + "assert.strictEqual(boo(1), false);", + "assert.strictEqual(boo(NaN), false);", + "assert.strictEqual(boo('a'), false);" + ], + "MDNlinks": [ + "Boolean Objects" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a105e963526e7de52b219be9", + "name": "Bonfire: Sorted Union", + "dashedName": "bonfire-sorted-union", + "difficulty": "2.07", + "description": [ + "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.", + "In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.", + "The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.", + "Check the assertion tests for examples.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function unite(arr1, arr2, arr3) {", + " return arr1;", + "}", + "", + "unite([1, 2, 3], [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');" + ], + "MDNlinks": [ + "Arguments object", + "Array.reduce()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a6b0bb188d873cb2c8729495", + "name": "Bonfire: Convert HTML Entities", + "dashedName": "bonfire-convert-html-entities", + "difficulty": "2.07", + "description": [ + "Convert the characters \"&\", \"<\", \">\", '\"' (double quote), and \"'\" (apostrophe), in a string to their corresponding HTML entities.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function convert(str) {", + " // :)", + " return str;", + "}", + "", + "convert('Dolce & Gabbana');" + ], + "tests": [ + "assert.strictEqual(convert('Dolce & Gabbana'), 'Dolce & Gabbana', 'should escape characters');", + "assert.strictEqual(convert('Hamburgers < Pizza < Tacos'), 'Hamburgers < Pizza < Tacos', 'should escape characters');", + "assert.strictEqual(convert('Sixty > twelve'), 'Sixty > twelve', 'should escape characters');", + "assert.strictEqual(convert('Stuff in \"quotation marks\"'), 'Stuff in "quotation marks"', 'should escape characters');", + "assert.strictEqual(convert(\"Shindler's List\"), 'Shindler's List', 'should escape characters');", + "assert.strictEqual(convert('<>'), '<>', 'should escape characters');", + "assert.strictEqual(convert('abc'), 'abc', 'should handle strings with nothing to escape');" + ], + "MDNlinks": [ + "RegExp", + "HTML Entities" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a103376db3ba46b2d50db289", + "name": "Bonfire: Spinal Tap Case", + "dashedName": "bonfire-spinal-tap-case", + "difficulty": "2.08", + "description": [ + "Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function spinalCase(str) {", + " // \"It's such a fine line between stupid, and clever.\"", + " // --David St. Hubbins", + " return str;", + "}", + "", + "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');" + ], + "MDNlinks": [ + "RegExp", + "String.replace()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a5229172f011153519423690", + "name": "Bonfire: Sum All Odd Fibonacci Numbers", + "dashedName": "bonfire-sum-all-odd-fibonacci-numbers", + "difficulty": "2.09", + "description": [ + "Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.", + "The first few numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8, and each subsequent number is the sum of the previous two numbers.", + "As an example, passing 4 to the function should return 5 because all the odd Fibonacci numbers under 4 are 1, 1, and 3.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function sumFibs(num) {", + " return num;", + "}", + "", + "sumFibs(4);" + ], + "tests": [ + "expect(sumFibs(1)).to.be.a('number');", + "expect(sumFibs(1000)).to.equal(1785);", + "expect(sumFibs(4000000)).to.equal(4613732);", + "expect(sumFibs(4)).to.equal(5);", + "expect(sumFibs(75024)).to.equal(60696);", + "expect(sumFibs(75025)).to.equal(135721);" + ], + "MDNlinks": [ + "Remainder" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a3bfc1673c0526e06d3ac698", + "name": "Bonfire: Sum All Primes", + "dashedName": "bonfire-sum-all-primes", + "difficulty": "2.10", + "description": [ + "Sum all the prime numbers up to and including the provided number.", + "A prime number is defined as having only two divisors, 1 and itself. For example, 2 is a prime number because it's only divisible by 1 and 2. 1 isn't a prime number, because it's only divisible by itself.", + "The provided number may not be a prime.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function sumPrimes(num) {", + " return num;", + "}", + "", + "sumPrimes(10);" + ], + "tests": [ + "expect(sumPrimes(10)).to.be.a('number');", + "expect(sumPrimes(10)).to.equal(17);", + "expect(sumPrimes(977)).to.equal(73156);" + ], + "MDNlinks": [ + "For Loops", + "Array.push()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "ae9defd7acaf69703ab432ea", + "name": "Bonfire: Smallest Common Multiple", + "dashedName": "bonfire-smallest-common-multiple", + "difficulty": "2.11", + "description": [ + "Find the smallest number that is evenly divisible by all numbers in the provided range.", + "The range will be an array of two numbers that will not necessarily be in numerical order.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function smallestCommons(arr) {", " return arr;", "}", "", - "orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);" + "", + "smallestCommons([1,5]);" ], "tests": [ - "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);", - "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" + "expect(smallestCommons([1,5])).to.be.a('number');", + "expect(smallestCommons([1,5])).to.equal(60);", + "expect(smallestCommons([5,1])).to.equal(60);", + "expect(smallestCommons([1,13])).to.equal(360360);" ], "MDNlinks": [ - "Math.pow()" + "Smallest Common Multiple" ], "challengeType": 5, "nameCn": "", @@ -96,32 +582,222 @@ "descriptionPt": [] }, { - "id": "a3f503de51cfab748ff001aa", - "name": "Bonfire: Pairwise", - "dashedName": "bonfire-pairwise", - "difficulty": "3.03", + "id": "a6e40f1041b06c996f7b2406", + "name": "Bonfire: Finders Keepers", + "dashedName": "bonfire-finders-keepers", + "difficulty": "2.12", "description": [ - "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", - "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.", - "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", + "Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument).", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ - "function pairwise(arr, arg) {", - " return arg;", + "function find(arr, func) {", + " var num = 0;", + " return num;", "}", "", - "pairwise([1,4,2,3,0,5], 7);" + "find([1, 2, 3, 4], function(num){ return num % 2 === 0; });" ], "tests": [ - "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);", - "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);", - "expect(pairwise([1,1,1], 2)).to.equal(1);", - "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);", - "expect(pairwise([], 100)).to.equal(0);" + "assert.strictEqual(find([1, 3, 5, 8, 9, 10], function(num) { return num % 2 === 0; }), 8, 'should return first found value');", + "assert.strictEqual(find([1, 3, 5, 9], function(num) { return num % 2 === 0; }), undefined, 'should return undefined if not found');" ], "MDNlinks": [ - "Array.reduce()" + "Array.some()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a5deed1811a43193f9f1c841", + "name": "Bonfire: Drop it", + "dashedName": "bonfire-drop-it", + "difficulty": "2.13", + "description": [ + "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function drop(arr, func) {", + " // Drop them elements.", + " return arr;", + "}", + "", + "drop([1, 2, 3], function(n) {return n < 3; });" + ], + "tests": [ + "expect(drop([1, 2, 3, 4], function(n) {return n >= 3; })).to.eqls([3, 4]);", + "expect(drop([1, 2, 3], function(n) {return n > 0; })).to.eqls([1, 2, 3]);", + "expect(drop([1, 2, 3, 4], function(n) {return n > 5; })).to.eqls([]);" + ], + "MDNlinks": [ + "Arguments object", + "Array.shift()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "ab306dbdcc907c7ddfc30830", + "name": "Bonfire: Steamroller", + "dashedName": "bonfire-steamroller", + "difficulty": "2.14", + "description": [ + "Flatten a nested array. You must account for varying levels of nesting.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function steamroller(arr) {", + " // I'm a steamroller, baby", + " return arr;", + "}", + "", + "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');" + ], + "MDNlinks": [ + "Array.isArray()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a8d97bd4c764e91f9d2bda01", + "name": "Bonfire: Binary Agents", + "dashedName": "bonfire-binary-agents", + "difficulty": "2.15", + "description": [ + "Return an English translated sentence of the passed binary string.", + "The binary string will be space separated.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function binaryAgent(str) {", + " return str;", + "}", + "", + "binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111');" + ], + "tests": [ + "expect(binaryAgent('01000001 01110010 01100101 01101110 00100111 01110100 00100000 01100010 01101111 01101110 01100110 01101001 01110010 01100101 01110011 00100000 01100110 01110101 01101110 00100001 00111111')).to.equal(\"Aren't bonfires fun!?\");", + "expect(binaryAgent('01001001 00100000 01101100 01101111 01110110 01100101 00100000 01000110 01110010 01100101 01100101 01000011 01101111 01100100 01100101 01000011 01100001 01101101 01110000 00100001')).to.equal(\"I love FreeCodeCamp!\");" + ], + "MDNlinks": [ + "String.charCodeAt()", + "String.fromCharCode()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a10d2431ad0c6a099a4b8b52", + "name": "Bonfire: Everything Be True", + "dashedName": "bonfire-everything-be-true", + "difficulty": "2.21", + "description": [ + "Check if the predicate (second argument) returns truthy (defined) for all elements of a collection (first argument).", + "For this, check to see if the property defined in the second argument is present on every element of the collection.", + "Remember, you can access object properties through either dot notation or [] notation.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function every(collection, pre) {", + " // Does everyone have one of these?", + " return pre;", + "}", + "", + "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');" + + ], + "MDNlinks": [ + "Object.hasOwnProperty()", + "Object.getOwnPropertyNames()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a97fd23d9b809dac9921074f", + "name": "Bonfire: Arguments Optional", + "dashedName": "bonfire-arguments-optional", + "difficulty": "2.22", + "description": [ + "Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.", + "For example, add(2, 3) should return 5, and add(2) should return a function that is waiting for an argument so that var sum2And = add(2); return sum2And(3); // 5", + "If either argument isn't a valid number, return undefined.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function add() {", + " return false;", + "}", + "", + "add(2,3);" + ], + "tests": [ + "expect(add(2, 3)).to.equal(5);", + "expect(add(2)(3)).to.equal(5);", + "expect(add('http://bit.ly/IqT6zt')).to.be.undefined;", + "expect(add(2, '3')).to.be.undefined;", + "expect(add(2)([3])).to.be.undefined;" + ], + "MDNlinks": [ + "Global Function Object", + "Arguments object" ], "challengeType": 5, "nameCn": "", diff --git a/challenges/intermediate-ziplines.json b/challenges/intermediate-ziplines.json index f06bc15efc..bba888f2cf 100644 --- a/challenges/intermediate-ziplines.json +++ b/challenges/intermediate-ziplines.json @@ -1,6 +1,6 @@ { "name": "Intermediate Front End Development Projects", - "order": 0.016, + "order": 0.017, "challenges": [ { "id": "bd7158d8c442eddfaeb5bd18", diff --git a/challenges/mongodb.json b/challenges/mongodb.json index 590fe3d6f2..4a9c9ce973 100644 --- a/challenges/mongodb.json +++ b/challenges/mongodb.json @@ -1,6 +1,6 @@ { "name": "MongoDB", - "order" : 0.014, + "order" : 0.015, "challenges": [ { "id": "bd7243d8c341eddeaeb5bd0f", diff --git a/challenges/nodejs-and-expressjs.json b/challenges/nodejs-and-expressjs.json index 10da3ae8c2..9d4282e8f7 100644 --- a/challenges/nodejs-and-expressjs.json +++ b/challenges/nodejs-and-expressjs.json @@ -1,6 +1,6 @@ { "name": "Node.js and Express.js", - "order" : 0.013, + "order" : 0.014, "challenges": [ { "id": "bd7153d8c441eddfaeb5bd0f", diff --git a/challenges/object-oriented-programming.json b/challenges/object-oriented-and-functional-programming.json similarity index 74% rename from challenges/object-oriented-programming.json rename to challenges/object-oriented-and-functional-programming.json index 11e3ad65e0..6ef66c0c9b 100644 --- a/challenges/object-oriented-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -1,6 +1,6 @@ { - "name": "Object Oriented Programming", - "order" : 0.008, + "name": "Object Oriented and Functional Programming", + "order" : 0.009, "challenges": [ { "id": "bd7153d8c44eeddfaeb5bd0f", @@ -86,6 +86,34 @@ "descriptionEs": [], "namePt": "", "descriptionPt": [] + }, + { + "id": "bd7129d8c441eddfbeb5bddf", + "name": "Waypoint: Practice Functional Programming", + "dashedName": "waypoint-practice-functional-programming", + "difficulty": 0.01, + "challengeSeed": ["129169463"], + "description": [ + "Functional programming holds the key to unlocking JavaScript's powerful asynchronous features.", + "Jafar Husain's interactive Functional Programming course will familiarize you with the various ways you can recombine these functions.", + "Functional programming in JavaScript involves using five key functions: \"map\", \"reduce\", \"filter\", \"concatAll\", and \"zip\".", + "Click here to go to the challenge: http://jhusain.github.io/learnrx/.", + "You only need to complete the first 27 steps of this tutorial.", + "This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.", + "If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on." + ], + "challengeType": 2, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] } ] } From 297838087602d3d835e23760e796777dc2e658df Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Wed, 5 Aug 2015 21:37:04 +0200 Subject: [PATCH 10/66] added test for object for steamroller bonfire --- challenges/intermediate-bonfires.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index 5ae11fc7a4..c3f86b44c6 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -675,7 +675,8 @@ "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 empty arrays');", + "assert.deepEqual(steamroller([1, {}, [3, [[4]]]]), [1, {}, 3, 4], 'should work with actual objects');" ], "MDNlinks": [ "Array.isArray()" From 9cb33e409c162c7714bf2bf4ff3b80c634846957 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 5 Aug 2015 11:29:19 -0700 Subject: [PATCH 11/66] add loopbackMigrationGrandfathered flag --- loopbackMigration.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/loopbackMigration.js b/loopbackMigration.js index 333629438a..d167ccec8b 100644 --- a/loopbackMigration.js +++ b/loopbackMigration.js @@ -92,6 +92,8 @@ var users = dbObservable user.username = 'fcc' + uuid.v4().slice(0, 8); if (user.github) { user.isGithubCool = true; + } else { + user.isMigrationGrandfathered = true; } return user; }) From 241147a5c856fdef03458784beb339cb5db8f9ee Mon Sep 17 00:00:00 2001 From: "Cristian V. Nica" Date: Wed, 5 Aug 2015 23:22:37 +0300 Subject: [PATCH 12/66] Fixing #1575 Fixing small typo --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 0325880343..fd393264d3 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -677,7 +677,7 @@ "description":[ "", "A very important data type in javascript is the Object ", - " Objects a similar to arrays except that instead of using indexes to access and modify their data, Objects have what are called properties ", + " Objects are similar to arrays except that instead of using indexes to access and modify their data, Objects have what are called properties ", "Here's a sample Object", "", "var cat = {", From cb929cdba9bcf8f5eabb24f8617efe3a3797a44b Mon Sep 17 00:00:00 2001 From: "Rafael J. Rodriguez" Date: Wed, 5 Aug 2015 17:34:06 -0400 Subject: [PATCH 13/66] Fix for Issue #1540 --- challenges/intermediate-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index c3f86b44c6..4019e54af5 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -356,7 +356,7 @@ " return arr1;", "}", "", - "unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);" + "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');", From 55dd99067d1cafbdcee36dde38d803d688501a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Floty=C5=84ski?= Date: Wed, 5 Aug 2015 23:53:45 +0200 Subject: [PATCH 14/66] Fixed tests in waypoint changes col-xs-12 to col-xs-6 so the tests works Issue #1578 --- challenges/bootstrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index 5a89962f12..5c0ddb95a8 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -1883,7 +1883,7 @@ "Above your right-well, inside its \"col-xs-6\" div element, add a h4 element with the text \"#right-well\"." ], "tests": [ - "assert($('.col-xs-12').children('h4') && $('.col-xs-12').children('h4').length > 1, 'Add an h4 element to each of your <div class=\\'col-xs-6\\'> elements.');", + "assert($('.col-xs-6').children('h4') && $('.col-xs-6').children('h4').length > 1, 'Add an h4 element to each of your <div class=\\'col-xs-6\\'> elements.');", "assert(new RegExp('#left-well','gi').test($('h4').text()), 'One h4 element should have the text \"#left-well\".');", "assert(new RegExp('#right-well','gi').test($('h4').text()), 'One h4 element should have the text \"#right-well\".');" ], From 16add147e4805ef868d424022cf8e2d889d52994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Floty=C5=84ski?= Date: Thu, 6 Aug 2015 00:20:52 +0200 Subject: [PATCH 15/66] first fixes - length larger _or equal_ to 1 I'm not sure if the tests are too vague - they allow to comment out way more than just the text specified - like the whole page.. --- challenges/bootstrap.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index 5a89962f12..5cfb6f699d 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -2036,9 +2036,9 @@ "Add a comment at the top of your HTML that says You shouldn't need to modify code below this line." ], "tests": [ - "assert(editor.match(//g).length > 1, 'Be sure to close your comment with -->.')" + "assert(editor.match(//g).length >= 1, 'Be sure to close your comment with -->.')" ], "challengeSeed": [ "
", From 5bd6c6dc3fd6b73cfc5c5f799a44df93bb7a96a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Floty=C5=84ski?= Date: Thu, 6 Aug 2015 00:25:11 +0200 Subject: [PATCH 16/66] changed to agree with the style - greater than 0 instead of greater than or eqal to 1 --- challenges/bootstrap.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index 5cfb6f699d..ba2869359a 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -2036,9 +2036,9 @@ "Add a comment at the top of your HTML that says You shouldn't need to modify code below this line." ], "tests": [ - "assert(editor.match(//g).length >= 1, 'Be sure to close your comment with -->.')" + "assert(editor.match(//g).length > 0, 'Be sure to close your comment with -->.')" ], "challengeSeed": [ "
", From 372b83d4f589058e0b185554a02534109272da15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Floty=C5=84ski?= Date: Thu, 6 Aug 2015 00:57:55 +0200 Subject: [PATCH 17/66] Fixed tests Added check if the object isn't null and escaped quotes because text enclosed apostrophe --- challenges/bootstrap.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index ba2869359a..03c9ed18bd 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -2036,9 +2036,9 @@ "Add a comment at the top of your HTML that says You shouldn't need to modify code below this line." ], "tests": [ - "assert(editor.match(//g).length > 0, 'Be sure to close your comment with -->.')" + "assert(editor.match(//g) && editor.match(/-->/g).length > 0, 'Be sure to close your comment with -->.')" ], "challengeSeed": [ "
", From 528efe32c8f5e0b81e0480d83575cfe09779ae10 Mon Sep 17 00:00:00 2001 From: "Cristian V. Nica" Date: Thu, 6 Aug 2015 09:30:13 +0300 Subject: [PATCH 18/66] Fixing issue #1488 Correcting small mistakes in the waypoint instruction. --- challenges/jquery-ajax-and-json.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/jquery-ajax-and-json.json b/challenges/jquery-ajax-and-json.json index ed9c2c64c9..dad707f590 100644 --- a/challenges/jquery-ajax-and-json.json +++ b/challenges/jquery-ajax-and-json.json @@ -257,9 +257,9 @@ "dashedName": "waypoint-target-the-same-element-with-multiple-jQuery-Selectors", "difficulty": 3.06, "description": [ - "Now you know three ways of targeting elements: by type ($('button')), by class (($('.btn')), and by id (($'#target1')).", + "Now you know three ways of targeting elements: by type $('button'), by class $('.btn')), and by id $('#target1')).", "Use each of these jQuery selectors to target your button element with the class \"btn\" and the id \"target1\".", - "Use the addClass() jQuery function to give the element one new class for each selector: \"animated\", \"shake\", and \"button-primary\"." + "Use the addClass() jQuery function to give the element one new class for each selector: \"animated\", \"shake\", and \"btn-primary\"." ], "tests": [ "assert(editor.match(/\\$\\(\\'button\\'\\)/g), 'Use the $\\(\\'button\\'\\) selector.')", From 01b157f90a347e20050be8907b7288fddbf0d491 Mon Sep 17 00:00:00 2001 From: Martin Kwan Date: Thu, 6 Aug 2015 00:02:15 -0700 Subject: [PATCH 19/66] Updated Roman Numeral Challenge link Updated link so it would open in a new tab instead of the current tab. --- challenges/intermediate-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index 4019e54af5..f9c9be22d8 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -103,7 +103,7 @@ "difficulty": "2.02", "description": [ "Convert the given number into a roman numeral.", - "All roman numerals answers should be provided in upper-case.", + "All roman numerals answers should be provided in upper-case.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ From d90bb6a4f4e2ca7bc61d3ca8f3a2850b0ef5c932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Floty=C5=84ski?= Date: Thu, 6 Aug 2015 09:03:03 +0200 Subject: [PATCH 20/66] Fixed a few typos in javascript-basic --- challenges/basic-javascript.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 15afb5ab25..52aab20a55 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -503,7 +503,7 @@ "difficulty":"9.98171", "description":[ "", - "We are able to modify the data store in an array be using indexes", + "We are able to modify the data stored in an array by using indexes", "Example:", "", "var ourArray = [1,2,3];", @@ -536,10 +536,10 @@ "difficulty": "9.9818", "description": [ "", - "When and array has been defined we still have the ability to make changes to it afterwards", + "When an array has been defined we still have the ability to make changes to it afterwards", "One common way in which we can manipulate the data in an array is through .pop() ", - " .pop() is used to \"pop\" a value from the end of an array. We can retrieve this value by preforming the pop in a variable declaration.", - "any type of variable can be \"popped\" from and array", + " .pop() is used to \"pop\" a value from the end of an array. We can retrieve this value by performing the pop in a variable declaration.", + "Any type of variable can be \"popped\" from an array", "Let's try .pop() now" ], "tests": [ @@ -639,13 +639,13 @@ "description":[ "", "In JavaScript we can divide up our code into separate and reusable parts called functions", - "here's and example of a function", + "Here's an example of a function", "", "function functionName (a, b){", " return(a + b);", "}", "", - "our function can be called like this", + "Our function can be called like this", "functionName();", "Let's try creating and calling a function now called myFunction" ], @@ -688,7 +688,7 @@ "};", "", "Objects are useful for storing data in a structured way or in a way that represents a real world object like a cat.", - "Let's try to make a Object that represents a dog called myDog!" + "Let's try to make an Object that represents a dog called myDog!" ], "tests":[ From f94e3b896eada1eb7208233ad16766c01c1137f2 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Thu, 6 Aug 2015 01:44:31 -0700 Subject: [PATCH 21/66] add simon zipline --- challenges/intermediate-ziplines.json | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/challenges/intermediate-ziplines.json b/challenges/intermediate-ziplines.json index bba888f2cf..0e6246077b 100644 --- a/challenges/intermediate-ziplines.json +++ b/challenges/intermediate-ziplines.json @@ -133,6 +133,45 @@ "descriptionEs": [], "namePt": "", "descriptionPt": [] + }, + { + "id": "bd7158d8c442eddfaeb5bd1c", + "name": "Zipline: Build a Simon Game", + "dashedName": "zipline-build-a-simon-game", + "difficulty": 1.07, + "challengeSeed": ["126415123"], + "description": [ + "Objective: Build a CodePen.io app that successfully reverse-engineers this: http://codepen.io/dting/full/KpJXZV/.", + "Rule #1: Don't look at the example project's code on CodePen. Figure it out for yourself.", + "Rule #2: You may use whichever libraries or APIs you need.", + "Rule #3: Reverse engineer the example project's functionality, and also feel free to personalize it.", + "Here are the user stories you must enable, and optional bonus user stories:", + "User Story: As a user, I am presented with a random series of button presses.", + "User Story: As a user, each time I input a series of button presses correctly, I see the same series of button presses but with an additional step.", + "User Story: As a user, I hear a sound that corresponds to each button both when the series of button presses plays, and when I personally press a button.", + "User Story: As a user, if I press the wrong button, I am notified that I have done so, and that series of button presses starts again to remind me of the pattern so I can try again.", + "User Story: As a user, I can see how many steps are in the current series of button presses.", + "Bonus User Story: As a user, if I want to restart, I can hit a button to do so, and the game will return to a single step.", + "Bonus User Story: As a user, I can play in strict mode where if I get a button press wrong, it notifies me that I have done so, and the game restarts at a new random series of button presses.", + "Bonus User Story: As a user, the tempo of the game speeds up incrementally on the 5th, 9th and 13th step.", + "Bonus User Story: As a user, I can win the game by getting a series of 20 steps correct. I am notified of my victory, then the game starts over.", + "Hint: Here are mp3s you can use for each button: https://s3.amazonaws.com/freecodecamp/simonSound1.mp3, https://s3.amazonaws.com/freecodecamp/simonSound2.mp3, https://s3.amazonaws.com/freecodecamp/simonSound3.mp3, https://s3.amazonaws.com/freecodecamp/simonSound4.mp3.", + "Remember to use RSAP if you get stuck.", + "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", + "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" + ], + "challengeType": 3, + "tests": [], + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] } ] } From ac44b5b4810bd075cf29a80d1381f75333e684a9 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Thu, 6 Aug 2015 02:06:53 -0700 Subject: [PATCH 22/66] rename all of Ben's JavaScript challenges to be more in line with other waypoints --- challenges/basic-javascript.json | 195 +++++++++++++------------------ 1 file changed, 78 insertions(+), 117 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 52aab20a55..ec12d76d01 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -4,18 +4,17 @@ "challenges": [ { "id":"bd7123c9c441eddfaeb4bdef", - "name":"Welcome To Comments", - "dashedName":"waypoint-welcome-to-comments", + "name":"Waypoint: Comment your JavaScript Code", + "dashedName":"waypoint-comment-your-javascript-code", "difficulty":"9.98", "description":[ - "", "A comment is a very useful line of code that is not actually ran by the machine executing it. With this property comments are the perfect way of creating notes to yourself or anyone else who reads your code describing what the code does", "It's an extremely important part in writing good, efficient and maintainable code and a requirement by most employers", "Let's take a look at the two ways in which we can write a comment in JavaScript", - " //This is a comment ", + "//This is a comment ", "These comment out the entire line that they are on", - " /*This is also a comment*/ ", - "These comment out everything in between /* and */ ", + "/*This is also a comment*/ ", + "These comment out everything in between /*and */", "Try creating one of each now." ], "tests":[ @@ -30,15 +29,15 @@ }, { "id": "bd7123c9c441eddfaeb5bdef", - "name": "Unconditionally Loving Booleans", - "dashedName": "waypoint-unconditionally-loving-booleans", + "name": "Waypoint: Understand Boolean Values", + "dashedName": "waypoint-understand-boolean-values", "difficulty": "9.98001", "description": [ "Return true", "A boolean is a type of variable that represents either true or false (Named after the British mathematician George Boole).", - "Booleans are often the result of a function or a comparative operation, for example 1==1 is true whereas 1==2 is false.", - "They are most commonly found inside if statements which we shall cover later", - "For now Let's modify our welcomeToBooleans function so that it will return true instead of false when the run button is clicked" + "Booleans are often the result of a function or a comparative operation, for example 1==1is true whereas 1==2is false.", + "They are most commonly found inside ifstatements which we shall cover later", + "For now Let's modify our welcomeToBooleansfunction so that it will return trueinstead of falsewhen the run button is clicked" ], "tests": [ "assert(typeof(welcomeToBooleans())=='boolean', 'The value returned by welcomeToBooleans() should be a boolean value. (true of false)');", @@ -56,11 +55,10 @@ }, { "id": "bd7123c9c443eddfaeb5bdef", - "name": "Start Using Variables", - "dashedName": "waypoint-start-using-variables", + "name": "Declare JavaScript Variables", + "dashedName": "waypoint-assign-values-to-javascript-variables", "difficulty": "9.9801", "description": [ - "", "Now, use the var keyword to create a variable called myName. Set its value to your name.", "Variables are used to store values.", "The name variable comes from the fact that it's value, varies!", @@ -84,13 +82,12 @@ }, { "id": "bd7123c9c444eddfaeb5bdef", - "name": "Define Your First and Last Name", + "name": "Declare String Variables", "dashedName": "waypoint-define-your-first-and-last-name", "difficulty": "9.9802", "description": [ - "", "Programs will almost always have several different variables that are used to keep track of several different pieces of data", - "We are now going to go and create two new variables myFirstName and myLastName that are strings", + "We are now going to go and create two new variables myFirstNameand myLastNamethat are strings", "You can assign these variables to be equal to your first and last names respectively." ], "tests": [ @@ -116,7 +113,6 @@ "dashedName": "waypoint-check-the-length-property-of-a-string-variable", "difficulty": "9.9809", "description": [ - "", "Use the .length property to count the number of characters in the lastNameLength variable.", "For example, if we created a variable var firstName = \"Julie\", we could find out how long the string \"Julie\" is by using the firstName.length property." ], @@ -185,9 +181,9 @@ "dashedName": "waypoint-use-bracket-notation-to-find-the-nth-character-in-a-string", "difficulty": "9.9811", "description": [ - "Just like the last lesson where we used Bracket Notation to access the first letter we can use the same method to get the letters ar other positions", + "Just like the last lesson where we used Bracket Notationto access the first letter we can use the same method to get the letters ar other positions", "Don't forget that computers start counting at 0 so the first letter is actually the zeroth one", - "Let's now try to set thirdLetterOfLastName to equal the third letter of the lastName variable", + "Let's now try to set thirdLetterOfLastNameto equal the third letter of the lastNamevariable", "Try looking at the secondLetterOfFirstName variable declaration if you get stuck." ], "tests": [ @@ -242,7 +238,7 @@ }, { "id": "bd7123c9c452eddfaeb5bdef", - "name": "Use Bracket Notation to Find the Nth to Last Character in a String", + "name": "Use Bracket Notation to Find the Nth-to-Last Character in a String", "dashedName": "waypoint-use-bracket-notation-to-find-the-nth-to-last-character-in-a-string", "difficulty": "9.9813", "description": [ @@ -272,15 +268,14 @@ }, { "id": "cf1111c1c11feddfaeb3bdef", - "name": "Magical Maths Addition", + "name": "Add Two Numbers with JavaScript", "dashedName": "waypoint-magical-maths-addition", "difficulty": "9.98141", "description": [ - "", "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", "Let's try a few of the most commonly used ones now", - "We use + for addition", - "Replace the 0 with correct number to achieve the result in the comment." + "We use +for addition", + "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ "assert((function(){if(add == 20 && editor.getValue().match(/\\+/g)){return(true);}else{return(false);}})(), 'Add should be the result of a sum and be equal to 20');" @@ -296,15 +291,14 @@ }, { "id": "cf1111c1c11feddfaeb4bdef", - "name": "Magical Maths Subtraction", + "name": "Subtract One Number from Another with JavaScript", "dashedName": "waypoint-magical-maths-subtraction", "difficulty": "9.98142", "description": [ - "", "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", "Let's try a few of the most commonly used ones now", - "We use - for subtraction", - "Replace the 0 with correct number to achieve the result in the comment." + "We use -for subtraction", + "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ "assert((function(){if(subtract == 12 && editor.getValue().match(/\\-/g)){return(true);}else{return(false);}})(), 'Subtract should be the result of a sum and be equal to 12');" @@ -320,15 +314,14 @@ }, { "id": "cf1231c1c11feddfaeb5bdef", - "name": "Magical Maths Multiplication", + "name": "Multiply Two Numbers with JavaScript", "dashedName": "waypoint-magical-maths-multiplication", "difficulty": "9.98143", "description": [ - "", "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", "Let's try a few of the most commonly used ones now", - "We use * for multiplication", - "Replace the 0 with correct number to achieve the result in the comment." + "We use *for multiplication", + "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ "assert((function(){if(multiply == 80 && editor.getValue().match(/\\*/g)){return(true);}else{return(false);}})(), 'Multiply should be the result of a sum and be equal to 80');" @@ -344,15 +337,14 @@ }, { "id": "cf1111c1c11feddfaeb6bdef", - "name": "Magical Maths Division", + "name": "Divide One Number by Another with JavaScript", "dashedName": "waypoint-magical-maths-division", "difficulty": "9.9814", "description": [ - "", "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", "Let's try a few of the most commonly used ones now", - "We use / for division", - "Replace the 0 with correct number to achieve the result in the comment." + "We use /for division", + "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ "assert((function(){if(divide == 2 && editor.getValue().match(/\\//g)){return(true);}else{return(false);}})(), 'Divide should be the result of a sum and be equal to 2');" @@ -368,11 +360,10 @@ }, { "id": "cf1391c1c11feddfaeb4bdef", - "name": "Creating Decimals", + "name": "Create Decimal Numbers with JavaScript", "dashedName": "waypoint-creating-decimals", "difficulty": "9.9815", "description": [ - "", "in JavaScript we can can work with decimal numbers", "Let's create a variable myDecimal and give it a decimal value." ], @@ -392,14 +383,11 @@ }, { "id": "bd7993c9c69feddfaeb7bdef", - "name": "Working With Decimals", + "name": "Perform Arithmetic Operations on Decimals with JavaScript", "dashedName": "waypoint-working-with-decimals", "difficulty": "9.98151", "description": [ - "", - "in JavaScript we can can work with decimal numbers", - "These decal numbers are known as floats.", - "Let's take a look at working with floats now" + "In JavaScript we can can work with decimal numbers." ], "tests": [ "assert(multiply == 15, 'The result of multiply should be 3.75');", @@ -417,14 +405,13 @@ }, { "id": "bd7993c9c69feddfaeb8bdef", - "name": "An Array Of new Information", + "name": "Store Multiple Values in one Variable using JavaScript Arrays", "dashedName": "waypoint-an-array-of-new-information", "difficulty": "9.9816", "description": [ - "", "In JavaScript we can store lists or collections of data in what are called arrays", - "Arrays are distinguished by the [ and ] around the data. Each piece of data is separated by a , ", - "Now let's create a new array called myArray with a string and a number with a , separating each one", + "Arrays are distinguished by the [and ]around the data. Each piece of data is separated by a , ", + "Now let's create a new array called myArraywith a stringand a numberwith a ,separating each one", "Refer to the example if you get stuck", "" ], @@ -445,11 +432,10 @@ }, { "id":"cf1111c1c11feddfaeb7bdef", - "name":"Nesting Arrays", + "name":"Nest one Array within Another Array", "dashedName":"waypoint-nesting-arrays", "difficulty":"9.98161", "description":[ - "", "We are also able to create arrays within arrays. This technique is called nesting.", "Let's now go create a nested array called myArray" ], @@ -466,11 +452,10 @@ }, { "id":"bg9997c9c79feddfaeb9bdef", - "name":"Accessing data with Indexes", + "name":"Access Array Data with Indexes", "dashedName":"waypoint-accessing-data-with-indexes", "difficulty":"9.9817", "description":[ - "", "Once an array has been created we can access the data we have stored in them using indexes", "Indexes are written in the same way as bracket notation that we covered earlier", "Example:", @@ -498,11 +483,10 @@ }, { "id":"cf1111c1c11feddfaeb8bdef", - "name":"Modifying Data With Indexes", + "name":"Modify Array Data With Indexes", "dashedName":"waypoint-modifying-data-with-indexes", "difficulty":"9.98171", "description":[ - "", "We are able to modify the data stored in an array by using indexes", "Example:", "", @@ -531,16 +515,15 @@ }, { "id": "bg9994c9c69feddfaeb9bdef", - "name": "Manipulating Arrays With pop()", + "name": "Manipulate Arrays With pop()", "dashedName": "waypoint-manipulating-arrays-with-pop", "difficulty": "9.9818", "description": [ - "", "When an array has been defined we still have the ability to make changes to it afterwards", - "One common way in which we can manipulate the data in an array is through .pop() ", - " .pop() is used to \"pop\" a value from the end of an array. We can retrieve this value by performing the pop in a variable declaration.", + "One common way in which we can manipulate the data in an array is through .pop() ", + ".pop()is used to \"pop\" a value from the end of an array. We can retrieve this value by performing the pop in a variable declaration.", "Any type of variable can be \"popped\" from an array", - "Let's try .pop() now" + "Let's try .pop()now" ], "tests": [ "assert((function(d){if(d[0] == 'John' && d[1] == 23 && d[2] == undefined){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23])');", @@ -563,13 +546,12 @@ }, { "id": "bg9995c9c69feddfaeb9bdef", - "name": "Manipulating Arrays With push()", + "name": "Manipulate Arrays With push()", "dashedName": "waypoint-manipulating-arrays-with-push", "difficulty": "9.9818", "description": [ - "", - "Now that we've learned how to pop things from the end of the array, we need to learn how to push stuff back to the end", - "Let's take the code we had last time and push this value to the end: ['dog', 3] " + "Now that we've learned how to popthings from the end of the array, we need to learn how to pushstuff back to the end", + "Let's take the code we had last time and pushthis value to the end: ['dog', 3] " ], "tests": [ "assert((function(d){if(d[2] != undefined && d[0] == 'John' && d[1] == 23 && d[2][0] == 'dog' && d[2][1] == 3 && d[2].length == 2){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23, [\"dog\", 3]])');" @@ -586,14 +568,13 @@ }, { "id": "bg9996c9c69feddfaeb9bdef", - "name": "Manipulating Arrays With shift()", + "name": "Manipulate Arrays With shift()", "dashedName": "waypoint-manipulating-arrays-with-shift", "difficulty": "9.9817", "description": [ - "", - "Another common way in which we can manipulate the data in an array is through .shift() ", - " .shift() is used to \"shift\" a value from the start of an array. We can retrieve this value by preforming the shift in a variable declaration.", - "Let's try .shift() now" + "Another common way in which we can manipulate the data in an array is through .shift() ", + ".shift()is used to \"shift\" a value from the start of an array. We can retrieve this value by preforming the shift in a variable declaration.", + "Let's try .shift()now" ], "tests": [ "assert((function(d){if(d[0] == 23 && d[1][0] == 'dog' && d[1][1] == 3 && d[2] == undefined){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23])');", @@ -610,13 +591,12 @@ }, { "id": "bg9997c9c69feddfaeb9bdef", - "name": "Manipulating Arrays With unshift()", + "name": "Manipulate Arrays With unshift()", "dashedName": "waypoint-manipulating-arrays-with-unshift", "difficulty": "9.9818", "description": [ - "", - "Now that we've learned how to shift things from the start of the array, we need to learn how to unshift stuff back to the start", - "Let's take the code we had last time and unshift this value to the end: 'Paul' " + "Now that we've learned how to shiftthings from the start of the array, we need to learn how to unshiftstuff back to the start", + "Let's take the code we had last time and unshiftthis value to the end: 'Paul' " ], "tests": [ "assert((function(d){if(d[0].toLowerCase() == 'paul' && d[1] == 23 && d[2][0] != undefined && d[2][0] == 'dog' && d[2][1] != undefined && d[2][1] == 3){return(true);}else{return(false);}})(myArray), 'myArray should now have [\"Paul\", 23, [\"dog\", 3]])');" @@ -633,11 +613,10 @@ }, { "id":"bg9997c9c89feddfaeb9bdef", - "name":"Make it functional", + "name":"Write Reusable JavaScript with Functions", "dashedName":"waypoint-make-it-functional", "difficulty":"9.9819", "description":[ - "", "In JavaScript we can divide up our code into separate and reusable parts called functions", "Here's an example of a function", "", @@ -671,13 +650,12 @@ }, { "id":"bg9998c9c99feddfaeb9bdef", - "name":"I Object!", + "name":"Build JavaScript Objects", "dashedName":"waypoint-i-object", "difficulty":"9.9822", "description":[ - "", - "A very important data type in javascript is the Object ", - " Objects are similar to arrays except that instead of using indexes to access and modify their data, Objects have what are called properties ", + "A very important data type in javascript is the Object", + "Objectsare similar to arrays except that instead of using indexes to access and modify their data, Objects have what are called properties ", "Here's a sample Object", "", "var cat = {", @@ -718,11 +696,10 @@ }, { "id":"bg9999c9c99feddfaeb9bdef", - "name":"Manipulating Objects", + "name":"Manipulate JavaScript Objects", "dashedName":"waypoint-manipulating-objects", "difficulty":"9.9823", "description":[ - "", "Now that we have an objects we need to know how to add and remove properties from it", "We add properties to objects like this", "myObject.myProperty = \"myValue\";", @@ -764,11 +741,10 @@ }, { "id":"cf1111c1c11feddfaeb5bdef", - "name":"Looping with for", + "name":"Iterate with JavaScript For Loops", "dashedName":"waypoint-looping-with-for", "difficulty":"9.9824", "description":[ - "", "Loops are a critical part of any program! The next few challenges", "first we will be taking a look at the for loop", "", @@ -794,11 +770,10 @@ }, { "id":"cf1111c1c11feddfaeb1bdef", - "name":"Looping with while", + "name":"Iterate with JavaScript While Loops", "dashedName":"waypoint-looping-with-while", "difficulty":"9.9825", "description":[ - "", "Loops are a critical part of any program! The next few challenges", "first we will be taking a look at the while loop", "", @@ -825,11 +800,10 @@ }, { "id":"cf1111c1c11feddfaeb2bdef", - "name":"Looping with do while", + "name":"Iterate with JavaScript Do-While Loops", "dashedName":"waypoint-looping-with-do-while", "difficulty":"9.9826", "description":[ - "", "Let's now take a look at the do - while loop", "", "var ourArray = [];", @@ -856,11 +830,10 @@ }, { "id":"cf1111c1c11feddfaeb9bdef", - "name":"Random Numbers", + "name":"Generate Random Fractions with JavaScript", "dashedName":"waypoint-random-numbers", "difficulty":"9.9827", "description":[ - "", "Random numbers are a very useful for creating random behaviours and games", "Javascript has a Math.random() method that can generate a random decimal number", "Let's have a go of Math.random() now be getting myFunction to return a random number" @@ -883,11 +856,10 @@ }, { "id":"cf1111c1c12feddfaeb1bdef", - "name":"Random Whole Numbers", + "name":"Generate Random Whole Numbers with JavaScript", "dashedName":"waypoint-random-whole-numbers", "difficulty":"9.9828", "description":[ - "", "While it's great that we can create random decimal numbers it's a lot more useful to generate a random whole number", "To achieve this we can multiply the random number by ten and use the Math.floor() to convert the decimal number to a whole number", "This technique gives us a whole number between zero and nine", @@ -913,11 +885,10 @@ }, { "id":"cf1111c1c12feddfaeb2bdef", - "name":"Random Whole Numbers In a Range", + "name":"Generate Random Whole Numbers within a Range", "dashedName":"waypoint-random-whole-numbers-in-a-range", "difficulty":"9.9829", "description":[ - "", "We can use a certain mathematical expression to get a random number between between twp numbers.", "Math.floor(Math.random() * (max - min + 1)) + min", "By using this we can control the output of the random number.", @@ -942,11 +913,10 @@ }, { "id":"cf1111c1c12feddfaeb3bdef", - "name":"If Else Statements", + "name":"Use Conditional Logic with If Else Statements", "dashedName":"waypoint-if-else-statements", "difficulty":"9.983", "description":[ - "", "We can use if statements in JavaScript to only execute code if a certain condition is met", "if statements require some sort of boolean condition evaluate", "Example:", @@ -977,11 +947,10 @@ }, { "id":"cf1111c1c12feddfaeb6bdef", - "name":"An Intro To RegEx", + "name":"Sift through Text with Regular Expressions", "dashedName":"waypoint-an-intro-to-regex", "difficulty":"9.984", "description":[ - "", "RegEx is a powerful tool we can use to find certain words or patterns in strings", "RegEx can look difficult at first but there's not much to getting it working", "If we wanted to find the number of times the word \"the\" occured in the string \"The dog chased the cat\" We could use the following RegEx:", @@ -1014,16 +983,14 @@ }, { "id":"cf1111c1c12feddfaeb7bdef", - "name":"Finding Numbers", + "name":"Find Numbers with Regular Expressions", "dashedName":"waypoint-finding-numbers", "difficulty":"9.985", "description":[ - "", "We can use special selectors in RegEx to select a particular type of value", "One such selector is the digit selector \\d which is used to grab the numbers in a string", "It is used like this:", - "/\\d+/g", - "" + "/\\d+/g" ], "tests":[ "assert(test === 2, 'Your RegEx should have found two numbers in the testString');", @@ -1046,15 +1013,13 @@ }, { "id":"cf1111c1c12feddfaeb8bdef", - "name":"Finding WhiteSpace", + "name":"Find White Space with Regular Expressions", "dashedName":"waypoint-finding-whitespace", "difficulty":"9.986", "description":[ - "", "We can also use selectors like \\s to find spaces in a string", "It is used like this:", - "/\\s+/g", - "" + "/\\s+/g" ], "tests":[ "assert(test === 7, 'Your RegEx should have found seven spaces in the testString');", @@ -1077,12 +1042,11 @@ }, { "id":"cf1111c1c13feddfaeb3bdef", - "name":"Inverting a Match", + "name":"Invert Regular Expression Matches with JavaScript", "dashedName":"waypoint-inverting-a-match", "difficulty":"9.987", "description":[ - "", - "Use /\\S+/gi; to match everything that ins't a space in the string", + "Use /\\S+/gi; to match everything that isn't a space in the string", "You can invert any match by using the uppercase version of the selector \\s versus \\S for example" ], "tests":[ @@ -1106,16 +1070,15 @@ }, { "id":"cf1111c1c12feddfaeb9bdef", - "name":"Creating a slots machine", + "name":"Create a JavaScript Slot Machine", "dashedName":"creating-a-slots-machine", "difficulty":"9.988", "description":[ - "", "We are now going to try and combine some of the stuff we've just learnt abd create the logic for a slot machine game", "For this we will need to generate three random numbers between 1 and 5 to represent the possible values of each individual slot", "Store the three random numbers in slotOne, slotTwo and slotThree", "Generate the random numbers by using the system we used earlier in /challenges/random-whole-numbers-in-a-range", - " Math.floor(Math.random() * (5 - 1 + 1)) + 1; " + "Math.floor(Math.random() * (5 - 1 + 1)) + 1; " ], "tests":[ "assert(typeof(runSlots($('.slot'))[0]) == 'number', 'SlotOne should be a random number');", @@ -1261,18 +1224,17 @@ }, { "id":"cf1111c1c13feddfaeb1bdef", - "name":"Setting Up The Slot Machine Slots", + "name":"Add your JavaScript Slot Machine Slots", "dashedName":"setting-up-the-slot-machine-slots", "difficulty":"9.989", "description":[ - "", "Now that we have our random numbers we need to go and check for when they are all the same that means we should count it as a win", "Different numbers will have different values so we need to return the matched number or null", "If we get a match we should change the value of win to the number that we have three of or leave it as null", "Let's create an if statement with multiple conditions to check that all the numbers are equal", - "if(slotOne !== slotTwo || slotTwo !== slotThree){", - " return(null);", - "}" + "if(slotOne !== slotTwo || slotTwo !== slotThree){", + " return(null);", + "}" ], "tests":[ "assert((function(){var data = runSlots();if(data == null){return(true)}else{if(data[0] == data[1] && data[1] == data[2]){return(true);}else{return(false);}}})(), 'If all three of our random numbers are the same we should return that number. Otherwise we should return null');" @@ -1421,11 +1383,10 @@ }, { "id":"cf1111c1c13feddfaeb2bdef", - "name":"Giving The Slot Machine Life", + "name":"Bring your JavaScript Slot Machine to Life", "dashedName":"giving-the-slot-machine-life", "difficulty":"9.990", "description":[ - "", "Now we can detect a win let's get the slot machine to look like it works", "We're going to use the jQuery selector $('.slot') to select all of the slots", "Once they are all selected we can use bracket notation to access each individual one like this", From 73ab630e0b5338350b2d7817cd0c18a397ba9b63 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Thu, 6 Aug 2015 02:26:09 -0700 Subject: [PATCH 23/66] update dashed name --- challenges/basic-javascript.json | 148 +++++++++++++++---------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index ec12d76d01..7b74868388 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1,11 +1,11 @@ { - "name": "Basic JavaScript", + "name": "Waypoint: Basic JavaScript", "order": 0.005, "challenges": [ { "id":"bd7123c9c441eddfaeb4bdef", - "name":"Waypoint: Comment your JavaScript Code", - "dashedName":"waypoint-comment-your-javascript-code", + "name": "Waypoint: Comment your JavaScript Code", + "dashedName": "waypoint-comment-your-javascript-code", "difficulty":"9.98", "description":[ "A comment is a very useful line of code that is not actually ran by the machine executing it. With this property comments are the perfect way of creating notes to yourself or anyone else who reads your code describing what the code does", @@ -55,8 +55,8 @@ }, { "id": "bd7123c9c443eddfaeb5bdef", - "name": "Declare JavaScript Variables", - "dashedName": "waypoint-assign-values-to-javascript-variables", + "name": "Waypoint: Declare JavaScript Variables", + "dashedName": "waypoint-declare-javascript-variables", "difficulty": "9.9801", "description": [ "Now, use the var keyword to create a variable called myName. Set its value to your name.", @@ -82,8 +82,8 @@ }, { "id": "bd7123c9c444eddfaeb5bdef", - "name": "Declare String Variables", - "dashedName": "waypoint-define-your-first-and-last-name", + "name": "Waypoint: Declare String Variables", + "dashedName": "waypoint-declare-string-variables", "difficulty": "9.9802", "description": [ "Programs will almost always have several different variables that are used to keep track of several different pieces of data", @@ -109,7 +109,7 @@ }, { "id": "bd7123c9c448eddfaeb5bdef", - "name": "Check the Length Property of a String Variable", + "name": "Waypoint: Check the Length Property of a String Variable", "dashedName": "waypoint-check-the-length-property-of-a-string-variable", "difficulty": "9.9809", "description": [ @@ -142,7 +142,7 @@ }, { "id": "bd7123c9c549eddfaeb5bdef", - "name": "Use Bracket Notation to Find the First Character in a String", + "name": "Waypoint: Use Bracket Notation to Find the First Character in a String", "dashedName": "waypoint-use-bracket-notation-to-find-the-first-character-in-a-string", "difficulty": "9.9810", "description": [ @@ -177,7 +177,7 @@ }, { "id": "bd7123c9c450eddfaeb5bdef", - "name": "Use Bracket Notation to Find the Nth Character in a String", + "name": "Waypoint: Use Bracket Notation to Find the Nth Character in a String", "dashedName": "waypoint-use-bracket-notation-to-find-the-nth-character-in-a-string", "difficulty": "9.9811", "description": [ @@ -208,7 +208,7 @@ }, { "id": "bd7123c9c451eddfaeb5bdef", - "name": "Use Bracket Notation to Find the Last Character in a String", + "name": "Waypoint: Use Bracket Notation to Find the Last Character in a String", "dashedName": "waypoint-use-bracket-notation-to-find-the-last-character-in-a-string", "difficulty": "9.9812", "description": [ @@ -238,7 +238,7 @@ }, { "id": "bd7123c9c452eddfaeb5bdef", - "name": "Use Bracket Notation to Find the Nth-to-Last Character in a String", + "name": "Waypoint: Use Bracket Notation to Find the Nth-to-Last Character in a String", "dashedName": "waypoint-use-bracket-notation-to-find-the-nth-to-last-character-in-a-string", "difficulty": "9.9813", "description": [ @@ -268,8 +268,8 @@ }, { "id": "cf1111c1c11feddfaeb3bdef", - "name": "Add Two Numbers with JavaScript", - "dashedName": "waypoint-magical-maths-addition", + "name": "Waypoint: Add Two Numbers with JavaScript", + "dashedName": "waypoint-add-two-numbers-with-javascript", "difficulty": "9.98141", "description": [ "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", @@ -291,8 +291,8 @@ }, { "id": "cf1111c1c11feddfaeb4bdef", - "name": "Subtract One Number from Another with JavaScript", - "dashedName": "waypoint-magical-maths-subtraction", + "name": "Waypoint: Subtract One Number from Another with JavaScript", + "dashedName": "waypoint-subtract-one-number-from-another-with-javascript", "difficulty": "9.98142", "description": [ "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", @@ -314,8 +314,8 @@ }, { "id": "cf1231c1c11feddfaeb5bdef", - "name": "Multiply Two Numbers with JavaScript", - "dashedName": "waypoint-magical-maths-multiplication", + "name": "Waypoint: Multiply Two Numbers with JavaScript", + "dashedName": "waypoint-multiply-two-numbers-with-javascript", "difficulty": "9.98143", "description": [ "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", @@ -337,8 +337,8 @@ }, { "id": "cf1111c1c11feddfaeb6bdef", - "name": "Divide One Number by Another with JavaScript", - "dashedName": "waypoint-magical-maths-division", + "name": "Waypoint: Divide One Number by Another with JavaScript", + "dashedName": "waypoint-divide-one-number-by-another-with-javascript", "difficulty": "9.9814", "description": [ "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", @@ -360,8 +360,8 @@ }, { "id": "cf1391c1c11feddfaeb4bdef", - "name": "Create Decimal Numbers with JavaScript", - "dashedName": "waypoint-creating-decimals", + "name": "Waypoint: Create Decimal Numbers with JavaScript", + "dashedName": "waypoint-create-decimal-numbers-with-javascript", "difficulty": "9.9815", "description": [ "in JavaScript we can can work with decimal numbers", @@ -383,8 +383,8 @@ }, { "id": "bd7993c9c69feddfaeb7bdef", - "name": "Perform Arithmetic Operations on Decimals with JavaScript", - "dashedName": "waypoint-working-with-decimals", + "name": "Waypoint: Perform Arithmetic Operations on Decimals with JavaScript", + "dashedName": "waypoint-perform-arithmetic-operations-on-decimals-with-javascript", "difficulty": "9.98151", "description": [ "In JavaScript we can can work with decimal numbers." @@ -405,8 +405,8 @@ }, { "id": "bd7993c9c69feddfaeb8bdef", - "name": "Store Multiple Values in one Variable using JavaScript Arrays", - "dashedName": "waypoint-an-array-of-new-information", + "name": "Waypoint: Store Multiple Values in one Variable using JavaScript Arrays", + "dashedName": "waypoint-store-multiple-values-in-one-variable-using-javascript-arrays", "difficulty": "9.9816", "description": [ "In JavaScript we can store lists or collections of data in what are called arrays", @@ -432,8 +432,8 @@ }, { "id":"cf1111c1c11feddfaeb7bdef", - "name":"Nest one Array within Another Array", - "dashedName":"waypoint-nesting-arrays", + "name": "Waypoint: Nest one Array within Another Array", + "dashedName": "waypoint-nest-one-array-within-another-array", "difficulty":"9.98161", "description":[ "We are also able to create arrays within arrays. This technique is called nesting.", @@ -452,8 +452,8 @@ }, { "id":"bg9997c9c79feddfaeb9bdef", - "name":"Access Array Data with Indexes", - "dashedName":"waypoint-accessing-data-with-indexes", + "name": "Waypoint: Access Array Data with Indexes", + "dashedName": "waypoint-access-array-data-with-indexes", "difficulty":"9.9817", "description":[ "Once an array has been created we can access the data we have stored in them using indexes", @@ -483,8 +483,8 @@ }, { "id":"cf1111c1c11feddfaeb8bdef", - "name":"Modify Array Data With Indexes", - "dashedName":"waypoint-modifying-data-with-indexes", + "name": "Waypoint: Modify Array Data With Indexes", + "dashedName": "waypoint-modify-array-data-with-indexes", "difficulty":"9.98171", "description":[ "We are able to modify the data stored in an array by using indexes", @@ -515,8 +515,8 @@ }, { "id": "bg9994c9c69feddfaeb9bdef", - "name": "Manipulate Arrays With pop()", - "dashedName": "waypoint-manipulating-arrays-with-pop", + "name": "Waypoint: Manipulate Arrays With pop()", + "dashedName": "waypoint-manipulate-arrays-with-pop", "difficulty": "9.9818", "description": [ "When an array has been defined we still have the ability to make changes to it afterwards", @@ -546,8 +546,8 @@ }, { "id": "bg9995c9c69feddfaeb9bdef", - "name": "Manipulate Arrays With push()", - "dashedName": "waypoint-manipulating-arrays-with-push", + "name": "Waypoint: Manipulate Arrays With push()", + "dashedName": "waypoint-manipulate-arrays-with-push", "difficulty": "9.9818", "description": [ "Now that we've learned how to popthings from the end of the array, we need to learn how to pushstuff back to the end", @@ -568,8 +568,8 @@ }, { "id": "bg9996c9c69feddfaeb9bdef", - "name": "Manipulate Arrays With shift()", - "dashedName": "waypoint-manipulating-arrays-with-shift", + "name": "Waypoint: Manipulate Arrays With shift()", + "dashedName": "waypoint-manipulate-arrays-with-shift", "difficulty": "9.9817", "description": [ "Another common way in which we can manipulate the data in an array is through .shift() ", @@ -591,8 +591,8 @@ }, { "id": "bg9997c9c69feddfaeb9bdef", - "name": "Manipulate Arrays With unshift()", - "dashedName": "waypoint-manipulating-arrays-with-unshift", + "name": "Waypoint: Manipulate Arrays With unshift()", + "dashedName": "waypoint-manipulate-arrays-with-unshift", "difficulty": "9.9818", "description": [ "Now that we've learned how to shiftthings from the start of the array, we need to learn how to unshiftstuff back to the start", @@ -613,8 +613,8 @@ }, { "id":"bg9997c9c89feddfaeb9bdef", - "name":"Write Reusable JavaScript with Functions", - "dashedName":"waypoint-make-it-functional", + "name": "Waypoint: Write Reusable JavaScript with Functions", + "dashedName": "waypoint-write-reusable-javascript-with-functions", "difficulty":"9.9819", "description":[ "In JavaScript we can divide up our code into separate and reusable parts called functions", @@ -650,8 +650,8 @@ }, { "id":"bg9998c9c99feddfaeb9bdef", - "name":"Build JavaScript Objects", - "dashedName":"waypoint-i-object", + "name": "Waypoint: Build JavaScript Objects", + "dashedName": "waypoint-build-javascript-objects", "difficulty":"9.9822", "description":[ "A very important data type in javascript is the Object", @@ -696,8 +696,8 @@ }, { "id":"bg9999c9c99feddfaeb9bdef", - "name":"Manipulate JavaScript Objects", - "dashedName":"waypoint-manipulating-objects", + "name": "Waypoint: Manipulate JavaScript Objects", + "dashedName": "waypoint-manipulate-javascript-objects", "difficulty":"9.9823", "description":[ "Now that we have an objects we need to know how to add and remove properties from it", @@ -741,8 +741,8 @@ }, { "id":"cf1111c1c11feddfaeb5bdef", - "name":"Iterate with JavaScript For Loops", - "dashedName":"waypoint-looping-with-for", + "name": "Waypoint: Iterate with JavaScript For Loops", + "dashedName": "waypoint-iterate-with-javascript-for-loops", "difficulty":"9.9824", "description":[ "Loops are a critical part of any program! The next few challenges", @@ -770,8 +770,8 @@ }, { "id":"cf1111c1c11feddfaeb1bdef", - "name":"Iterate with JavaScript While Loops", - "dashedName":"waypoint-looping-with-while", + "name": "Waypoint: Iterate with JavaScript While Loops", + "dashedName": "waypoint-iterate-with-javascript-while-loops", "difficulty":"9.9825", "description":[ "Loops are a critical part of any program! The next few challenges", @@ -800,8 +800,8 @@ }, { "id":"cf1111c1c11feddfaeb2bdef", - "name":"Iterate with JavaScript Do-While Loops", - "dashedName":"waypoint-looping-with-do-while", + "name": "Waypoint: Iterate with JavaScript Do-While Loops", + "dashedName": "waypoint-iterate-with-javascript-do-while-loops", "difficulty":"9.9826", "description":[ "Let's now take a look at the do - while loop", @@ -830,8 +830,8 @@ }, { "id":"cf1111c1c11feddfaeb9bdef", - "name":"Generate Random Fractions with JavaScript", - "dashedName":"waypoint-random-numbers", + "name": "Waypoint: Generate Random Fractions with JavaScript", + "dashedName": "waypoint-generate-random-fractions-with-javascript", "difficulty":"9.9827", "description":[ "Random numbers are a very useful for creating random behaviours and games", @@ -856,8 +856,8 @@ }, { "id":"cf1111c1c12feddfaeb1bdef", - "name":"Generate Random Whole Numbers with JavaScript", - "dashedName":"waypoint-random-whole-numbers", + "name": "Waypoint: Generate Random Whole Numbers with JavaScript", + "dashedName": "waypoint-generate-random-whole-numbers-with-javascript", "difficulty":"9.9828", "description":[ "While it's great that we can create random decimal numbers it's a lot more useful to generate a random whole number", @@ -885,8 +885,8 @@ }, { "id":"cf1111c1c12feddfaeb2bdef", - "name":"Generate Random Whole Numbers within a Range", - "dashedName":"waypoint-random-whole-numbers-in-a-range", + "name": "Waypoint: Generate Random Whole Numbers within a Range", + "dashedName": "waypoint-generate-random-whole-numbers-within-a-range", "difficulty":"9.9829", "description":[ "We can use a certain mathematical expression to get a random number between between twp numbers.", @@ -913,8 +913,8 @@ }, { "id":"cf1111c1c12feddfaeb3bdef", - "name":"Use Conditional Logic with If Else Statements", - "dashedName":"waypoint-if-else-statements", + "name": "Waypoint: Use Conditional Logic with If-Else Statements", + "dashedName": "waypoint-use-conditional-logic-with-if-else-statements", "difficulty":"9.983", "description":[ "We can use if statements in JavaScript to only execute code if a certain condition is met", @@ -947,8 +947,8 @@ }, { "id":"cf1111c1c12feddfaeb6bdef", - "name":"Sift through Text with Regular Expressions", - "dashedName":"waypoint-an-intro-to-regex", + "name": "Waypoint: Sift through Text with Regular Expressions", + "dashedName": "waypoint-sift-through-text-with-regular-expressions", "difficulty":"9.984", "description":[ "RegEx is a powerful tool we can use to find certain words or patterns in strings", @@ -983,8 +983,8 @@ }, { "id":"cf1111c1c12feddfaeb7bdef", - "name":"Find Numbers with Regular Expressions", - "dashedName":"waypoint-finding-numbers", + "name": "Waypoint: Find Numbers with Regular Expressions", + "dashedName": "waypoint-find-numbers-with-regular-expressions", "difficulty":"9.985", "description":[ "We can use special selectors in RegEx to select a particular type of value", @@ -1013,8 +1013,8 @@ }, { "id":"cf1111c1c12feddfaeb8bdef", - "name":"Find White Space with Regular Expressions", - "dashedName":"waypoint-finding-whitespace", + "name": "Waypoint: Find White Space with Regular Expressions", + "dashedName": "waypoint-find-white-space-with-regular-expressions", "difficulty":"9.986", "description":[ "We can also use selectors like \\s to find spaces in a string", @@ -1042,8 +1042,8 @@ }, { "id":"cf1111c1c13feddfaeb3bdef", - "name":"Invert Regular Expression Matches with JavaScript", - "dashedName":"waypoint-inverting-a-match", + "name": "Waypoint: Invert Regular Expression Matches with JavaScript", + "dashedName": "waypoint-invert-regular-expression-matches-with-javaScript", "difficulty":"9.987", "description":[ "Use /\\S+/gi; to match everything that isn't a space in the string", @@ -1070,8 +1070,8 @@ }, { "id":"cf1111c1c12feddfaeb9bdef", - "name":"Create a JavaScript Slot Machine", - "dashedName":"creating-a-slots-machine", + "name": "Waypoint: Create a JavaScript Slot Machine", + "dashedName": "waypoint-create-a-javascript-slot-machine", "difficulty":"9.988", "description":[ "We are now going to try and combine some of the stuff we've just learnt abd create the logic for a slot machine game", @@ -1224,8 +1224,8 @@ }, { "id":"cf1111c1c13feddfaeb1bdef", - "name":"Add your JavaScript Slot Machine Slots", - "dashedName":"setting-up-the-slot-machine-slots", + "name": "Waypoint: Add your JavaScript Slot Machine Slots", + "dashedName": "waypoint-add-your-javascript-slot-machine-slots", "difficulty":"9.989", "description":[ "Now that we have our random numbers we need to go and check for when they are all the same that means we should count it as a win", @@ -1383,8 +1383,8 @@ }, { "id":"cf1111c1c13feddfaeb2bdef", - "name":"Bring your JavaScript Slot Machine to Life", - "dashedName":"giving-the-slot-machine-life", + "name": "Waypoint: Bring your JavaScript Slot Machine to Life", + "dashedName": "waypoint-bring-your-javascript-slot-machine-to-life", "difficulty":"9.990", "description":[ "Now we can detect a win let's get the slot machine to look like it works", From afa352169d132339dcc1a1d371c0446e6d6f6cd5 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Thu, 6 Aug 2015 02:27:56 -0700 Subject: [PATCH 24/66] fix some issues that were breaking seed task --- challenges/intermediate-bonfires.json | 2 +- challenges/intermediate-ziplines.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index f9c9be22d8..7b678840bd 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -103,7 +103,7 @@ "difficulty": "2.02", "description": [ "Convert the given number into a roman numeral.", - "All roman numerals answers should be provided in upper-case.", + "All roman numerals answers should be provided in upper-case.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ diff --git a/challenges/intermediate-ziplines.json b/challenges/intermediate-ziplines.json index 0e6246077b..7857686196 100644 --- a/challenges/intermediate-ziplines.json +++ b/challenges/intermediate-ziplines.json @@ -102,7 +102,7 @@ "descriptionPt": [] }, { - "id": "bd7158d8c442eddfaeb5bd1c", + "id": "bd7158d8c442eedfaeb5bd1c", "name": "Zipline: Build a Tic Tac Toe Game", "dashedName": "zipline-build-a-tic-tac-toe-game", "difficulty": 1.06, From a82265e883c4ddcb056132952bde0939e71f54d5 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Thu, 6 Aug 2015 14:51:26 +0100 Subject: [PATCH 25/66] Fix https://github.com/FreeCodeCamp/freecodecamp/issues/1599 --- challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 7b74868388..3f92055c6e 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -1046,7 +1046,7 @@ "dashedName": "waypoint-invert-regular-expression-matches-with-javaScript", "difficulty":"9.987", "description":[ - "Use /\\S+/gi; to match everything that isn't a space in the string", + "Use /\\S/gi; to match everything that isn't a space in the string", "You can invert any match by using the uppercase version of the selector \\s versus \\S for example" ], "tests":[ From 7284bbf7a7121fd41613d2154c085781e7a2517c Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Thu, 6 Aug 2015 14:54:44 +0100 Subject: [PATCH 26/66] Fix https://github.com/FreeCodeCamp/freecodecamp/issues/1593 --- challenges/basic-javascript.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 3f92055c6e..4932ddd044 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -573,12 +573,12 @@ "difficulty": "9.9817", "description": [ "Another common way in which we can manipulate the data in an array is through .shift() ", - ".shift()is used to \"shift\" a value from the start of an array. We can retrieve this value by preforming the shift in a variable declaration.", + ".shift()is used to \"shift\" a value from the start of an array. We can retrieve this value by performing the shift in a variable declaration.", "Let's try .shift()now" ], "tests": [ "assert((function(d){if(d[0] == 23 && d[1][0] == 'dog' && d[1][1] == 3 && d[2] == undefined){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23])');", - "assert((function(d){if(d === 'John' && typeof(removed) === 'function'){return(true);}else{return(false);}})(removed), 'Removed should contain \"John\"');" + "assert((function(d){if(d === 'John' && typeof(removed) === 'string'){return(true);}else{return(false);}})(removed), 'Removed should contain \"John\"');" ], "challengeSeed": [ "var myArray = ['John', 23, ['dog', 3]];", From 1874e517f7f9bd20f238068a1f1d398ee8f14221 Mon Sep 17 00:00:00 2001 From: Dealga McArdle Date: Thu, 6 Aug 2015 16:02:20 +0200 Subject: [PATCH 27/66] sputkin -> sputnik --- challenges/advanced-bonfires.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index 093580e24f..360d05a52b 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -74,10 +74,10 @@ " return arr;", "}", "", - "orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}]);" + "orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]);" ], "tests": [ - "expect(orbitalPeriod([{name : \"sputkin\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputkin\", orbitalPeriod: 86400}]);", + "expect(orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputnik\", orbitalPeriod: 86400}]);", "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" ], "MDNlinks": [ From 0624b65292bb86a6e81f5a3742fa7ad4c4e8f81e Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Thu, 6 Aug 2015 20:45:59 +0200 Subject: [PATCH 28/66] fixed typos --- challenges/basic-javascript.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 4932ddd044..75b91415ac 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -834,8 +834,8 @@ "dashedName": "waypoint-generate-random-fractions-with-javascript", "difficulty":"9.9827", "description":[ - "Random numbers are a very useful for creating random behaviours and games", - "Javascript has a Math.random() method that can generate a random decimal number", + "Random numbers are very useful for creating random behaviours and games", + "JavaScript has a Math.random() method that can generate a random decimal number", "Let's have a go of Math.random() now be getting myFunction to return a random number" ], "tests":[ From e9ad1bad8df47ecaf4f74f0a4208d9f0a24bcecb Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Thu, 6 Aug 2015 21:31:24 +0200 Subject: [PATCH 29/66] fixed typos --- challenges/html5-and-css.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index 7cbb0d11c7..f4a11581d3 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -3348,11 +3348,11 @@ "dashedName": "waypoint-override-all-other-styles-by-using-important", "difficulty": 1.53, "description": [ - "Yay! we just proved that in-line styles will override all the CSS declarations in your style element.", + "Yay! We just proved that in-line styles will override all the CSS declarations in your style element.", "But wait. There's one last way to override CSS. This is the most powerful method of all. But before we do it, let's talk about why you would ever want to override CSS.", "In many situations, you will use CSS libraries. These may accidentally override your own CSS. So when you absolutely need to be sure that an element has specific CSS, you can use !important.", "Let's go all the way back to our \"pink-text\" class declaration. Remember that our \"pink-text\" class was overridden by subsequent class declarations, id declarations, and in-line styles.", - "Let's add the keyword !important to your body' element's color declaration to make 100% sure that your h1 element will be pink.", + "Let's add the keyword !important to your pink-text element's color declaration to make 100% sure that your h1 element will be pink.", "An example of how to do this is: color: red !important;" ], "tests": [ From 962ee6d7d55c13c0cc001b3988dab9d6fa7c0253 Mon Sep 17 00:00:00 2001 From: ahstro Date: Thu, 6 Aug 2015 22:07:52 +0200 Subject: [PATCH 30/66] Changed test order & added in 'img to link' --- challenges/html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index f4a11581d3..cad97a45bb 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -1259,8 +1259,8 @@ "Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link." ], "tests": [ + "assert($('a').children('img').length > 0, 'Nest your img element within an a element.')", "assert(new RegExp('#').test($('a').children('img').parent().attr('href')), 'Your a element should be a dead link with a href attribute set to \"#\".')", - "assert($('a').children('img').length > 0, 'Nest your image element within an a element.')", "assert(editor.match(/<\\/a>/g) && editor.match(//g).length === editor.match(/a elements has a closing tag.')" ], "challengeSeed": [ From 260b4b2bb72912ab45b0b92f9cc859c09b68fae8 Mon Sep 17 00:00:00 2001 From: ahstro Date: Thu, 6 Aug 2015 22:22:58 +0200 Subject: [PATCH 31/66] Updated test case comment in 'fluid containers' --- challenges/bootstrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index def874e207..c921a15573 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -15,7 +15,7 @@ "To get started, we should nest all of our HTML in a div element with the class \"container-fluid\"." ], "tests": [ - "assert($('div').hasClass('container-fluid'), 'Your div element should have the class \"row\"')", + "assert($('div').hasClass('container-fluid'), 'Your div element should have the class \"container-fluid\"')", "assert(editor.match(/<\\/div>/g) && editor.match(/
/g).length === editor.match(/
div elements has a closing tag.')" ], "challengeSeed": [ From e0f1342a00efaae49092b639fae0e354589fe62a Mon Sep 17 00:00:00 2001 From: ahstro Date: Thu, 6 Aug 2015 22:27:01 +0200 Subject: [PATCH 32/66] Grammatical error in 'Use Hex Code for Specific Colors' --- challenges/html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index f4a11581d3..a08b9001f9 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -3402,7 +3402,7 @@ "dashedName": "waypoint-use-hex-code-for-specific-colors", "difficulty": 1.54, "description": [ - "Did you know there other ways to represent colors in CSS? One of these ways is called hexadecimal code, or \"hex code\" for short.", + "Did you know there are other ways to represent colors in CSS? One of these ways is called hexadecimal code, or \"hex code\" for short.", "\"Decimal\" means the numbers zero through nine - the numbers that people use in everyday life. \"Hexadecimal\" includes these 10 numbers, plus the letters A, B, C, D, E and F. This means that Hexidecimal has a total of 16 possible values, instead of the 10 possible values that our normal base-10 number system gives us.", "With CSS, we use 6 hexidecimal number to represent colors. For example, #000000 is the lowest possible value, and it represents the color black.", "Replace the word \"black\" in our body element's background-color with its \"hex code\" representation, #000000. " From f9498f8e866f0bb29021d1997d0856eefffc9254 Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Thu, 6 Aug 2015 22:30:46 +0200 Subject: [PATCH 33/66] updated instructions for waypoint: get set for ziplines to fit with new Codepen UI --- challenges/basic-ziplines.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/basic-ziplines.json b/challenges/basic-ziplines.json index cb4f9bd8a5..e3cdfb7300 100644 --- a/challenges/basic-ziplines.json +++ b/challenges/basic-ziplines.json @@ -17,9 +17,9 @@ "Go to http://codepen.io and create an account.", "Click your user image in the top right corner, then click the \"New pen\" button that drops down.", "Drag the windows around and press the buttons in the lower-right hand corner to change the orientation to suit your preference.", - "Click the gear next to CSS. Then in the \"External CSS File or Another Pen\" text field, type \"bootstrap\" and scroll down until you see the latest version of Bootstrap. Click it.", + "Click the gear next to CSS. Click the \"Quick-add...\" select box and choose Bootstrap.", "Verify that bootstrap is active by adding the following code to your HTML: <h1 class='text-primary'>Hello CodePen!</h1>. The text's color should be Bootstrap blue.", - "Click the gear next to JavaScript. Click the \"Latest version of...\" select box and choose jQuery.", + "Click the gear next to JavaScript. Click the \"Quick-add...\" select box and choose jQuery.", "Now add the following code to your JavaScript: $(document).ready(function() { $('.text-primary').text('Hi CodePen!') });. Click the \"Save\" button at the top. Your \"Hello CodePen!\" should change to \"Hi CodePen!\". This means that jQuery is working.", "You can use this CodePen that you've just created as a starting point for your Ziplines. Just click the \"fork\" button at the top of your CodePen and it will create a duplicate CodePen.", "Now you're ready for your first Zipline. Click the \"I've completed this challenge\" button." From 7e5ddb102c4a74ae86fe2e9d5793a99eb47659f9 Mon Sep 17 00:00:00 2001 From: ahstro Date: Thu, 6 Aug 2015 22:41:45 +0200 Subject: [PATCH 34/66] Wrong element in jQuery targeting waypoint --- challenges/jquery-ajax-and-json.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/jquery-ajax-and-json.json b/challenges/jquery-ajax-and-json.json index dad707f590..6c1fe0039f 100644 --- a/challenges/jquery-ajax-and-json.json +++ b/challenges/jquery-ajax-and-json.json @@ -60,7 +60,7 @@ "For example, let's make all of your button elements bounce. Just add this code inside your \"document ready function\": $('button').addClass('animated bounce')." ], "tests": [ - "assert($('button').hasClass('animated') && $('button').hasClass('bounce'), 'Use the jQuery addClass() function to give the classes \"animated\" and \"bounce\" to your img element.')", + "assert($('button').hasClass('animated') && $('button').hasClass('bounce'), 'Use the jQuery addClass() function to give the classes \"animated\" and \"bounce\" to your button element.')", "assert(!editor.match(/class.*animated/g), 'Only use jQuery to add these classes to the element.')" ], "challengeSeed": [ From 85026d558e23c5ccc1c17431ee49eb3f96bebf69 Mon Sep 17 00:00:00 2001 From: Samuel Plumppu Date: Fri, 7 Aug 2015 02:13:11 +0200 Subject: [PATCH 35/66] fixed tests to check for lowercase hexadecimal colors --- challenges/html5-and-css.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index f4a11581d3..3896334683 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -3516,7 +3516,7 @@ ], "tests": [ "assert($('body').css('background-color') === 'rgb(0, 255, 0)', 'Give your body element the background-color of green.')", - "assert(editor.match(/#00FF00/g) && editor.match(/#00FF00/g).length > 0, 'Use hex code the color green instead of the word \"green\". For example body: { color: #00FF00; }.')" + "assert(editor.match(/#00[Ff]{2}00/g) && editor.match(/#00[Ff]{2}00/g).length > 0, 'Use hex code the color green instead of the word \"green\". For example body: { color: #00FF00; }.')" ], "challengeSeed": [ "" ], + "type": "waypoint", "challengeType": 0 }, { "id":"cf1111c1c13feddfaeb1bdef", - "title": "Waypoint: Add your JavaScript Slot Machine Slots", + "title": "Add your JavaScript Slot Machine Slots", "difficulty":"9.989", "description":[ "Now that we have our random numbers we need to go and check for when they are all the same that means we should count it as a win", @@ -1338,11 +1376,12 @@ " }", "" ], + "type": "waypoint", "challengeType": 0 }, { "id":"cf1111c1c13feddfaeb2bdef", - "title": "Waypoint: Bring your JavaScript Slot Machine to Life", + "title": "Bring your JavaScript Slot Machine to Life", "difficulty":"9.990", "description":[ "Now we can detect a win let's get the slot machine to look like it works", @@ -1504,6 +1543,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0 } ] diff --git a/challenges/basic-ziplines.json b/challenges/basic-ziplines.json index ea667f7073..b96619bb78 100644 --- a/challenges/basic-ziplines.json +++ b/challenges/basic-ziplines.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7158d8c442eddfbeb5bd1f", - "title": "Waypoint: Get Set for Ziplines", + "title": "Get Set for Ziplines", "difficulty": 1.00, "challengeSeed": ["125658022"], "description": [ @@ -23,6 +23,7 @@ "You can use this CodePen that you've just created as a starting point for your Ziplines. Just click the \"fork\" button at the top of your CodePen and it will create a duplicate CodePen.", "Now you're ready for your first Zipline. Click the \"I've completed this challenge\" button." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -38,7 +39,7 @@ }, { "id": "bd7158d8c242eddfaeb5bd13", - "title": "Zipline: Build a Personal Portfolio Webpage", + "title": "Build a Personal Portfolio Webpage", "difficulty": 1.01, "challengeSeed": ["133315782"], "description": [ @@ -58,6 +59,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -73,7 +75,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd13", - "title": "Zipline: Build a Random Quote Machine", + "title": "Build a Random Quote Machine", "difficulty": 1.02, "challengeSeed": ["126415122"], "description": [ @@ -89,6 +91,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -104,7 +107,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd10", - "title": "Zipline: Show the Local Weather", + "title": "Show the Local Weather", "difficulty": 1.03, "challengeSeed": ["126415127"], "description": [ @@ -121,6 +124,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -136,7 +140,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd0f", - "title": "Zipline: Build a Pomodoro Clock", + "title": "Build a Pomodoro Clock", "difficulty": 1.04, "challengeSeed": ["126411567"], "description": [ @@ -152,6 +156,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -167,7 +172,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd1f", - "title": "Zipline: Use the Twitch.tv JSON API", + "title": "Use the Twitch.tv JSON API", "difficulty": 1.05, "challengeSeed": ["126411564"], "description": [ @@ -187,6 +192,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index d9ac143796..4efee80099 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bad87fee1348bd9acde08712", - "title": "Waypoint: Use Responsive Design with Bootstrap Fluid Containers", + "title": "Use Responsive Design with Bootstrap Fluid Containers", "difficulty": 2.01, "description": [ "Now let's go back to our Cat Photo App. This time, we'll style it using the popular Bootstrap responsive CSS framework.", @@ -73,6 +73,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -87,7 +88,7 @@ }, { "id": "bad87fee1348bd9acde08812", - "title": "Waypoint: Make Images Mobile Responsive", + "title": "Make Images Mobile Responsive", "difficulty": 2.02, "description": [ "First, Add a new image with the src attribute of \"http://bit.ly/fcc-kittens2\".", @@ -157,6 +158,7 @@ " ", "
" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -171,7 +173,7 @@ }, { "id": "bad87fee1348bd8acde08812", - "title": "Waypoint: Center Text with Bootstrap", + "title": "Center Text with Bootstrap", "difficulty": 2.03, "description": [ "Now that we're using Bootstrap, we can center our heading elements to make them look better. All we need to do is add the class text-center to our h1 and h2 elements.", @@ -239,6 +241,7 @@ " ", "
" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -253,7 +256,7 @@ }, { "id": "bad87fee1348cd8acdf08812", - "title": "Waypoint: Create a Bootstrap Button", + "title": "Create a Bootstrap Button", "difficulty": 2.04, "description": [ "Bootstrap has its own styles for button elements, which look much better than the plain HTML ones.", @@ -323,6 +326,7 @@ " ", "
" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -337,7 +341,7 @@ }, { "id": "bad87fee1348cd8acef08812", - "title": "Waypoint: Create a Block Element Bootstrap Button", + "title": "Create a Block Element Bootstrap Button", "difficulty": 2.05, "description": [ "Normally, your button elements are only as wide as the text that they contain. By making them block elements, your button will stretch to fill your page's entire horizontal space.", @@ -411,6 +415,7 @@ " ", "
" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -425,7 +430,7 @@ }, { "id": "bad87fee1348cd8acef08811", - "title": "Waypoint: Taste the Bootstrap Button Color Rainbow", + "title": "Taste the Bootstrap Button Color Rainbow", "difficulty": 2.06, "description": [ "The \"btn-primary\" class is the main color you'll use in your app. It is useful for highlighting actions you want your user to take.", @@ -497,6 +502,7 @@ " ", "
" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -511,7 +517,7 @@ }, { "id": "bad87fee1348cd8acef08813", - "title": "Waypoint: Call out Optional Actions with Button Info", + "title": "Call out Optional Actions with Button Info", "difficulty": 2.07, "description": [ "Bootstrap comes with several pre-defined colors for buttons. The \"btn-info\" class is used to call attention to optional actions that the user can take.", @@ -584,6 +590,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -598,7 +605,7 @@ }, { "id": "bad87fee1348ce8acef08814", - "title": "Waypoint: Warn your Users of a Dangerous Action", + "title": "Warn your Users of a Dangerous Action", "difficulty": 2.08, "description": [ "Bootstrap comes with several pre-defined colors for buttons. The \"btn-danger\" class is the button color you'll use to notify users that the button performs a destructive action, such as deleting a cat photo.", @@ -672,6 +679,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -686,7 +694,7 @@ }, { "id": "bad88fee1348ce8acef08815", - "title": "Waypoint: Use the Bootstrap Grid to Put Elements Side By Side", + "title": "Use the Bootstrap Grid to Put Elements Side By Side", "difficulty": 2.09, "description": [ "Bootstrap uses a responsive grid system, which makes it easy to put elements into rows and specify each element's relative width. Most of Bootstrap's classes can be applied to a div element.", @@ -765,6 +773,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -779,7 +788,7 @@ }, { "id": "bad87fee1348bd9aedf08845", - "title": "Waypoint: Ditch Custom CSS for Bootstrap", + "title": "Ditch Custom CSS for Bootstrap", "difficulty": 2.10, "description": [ "We can clean up our code and make our Cat Photo App look more conventional by using Bootstrap's built-in styles instead of the custom styles we created earlier.", @@ -863,6 +872,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -877,7 +887,7 @@ }, { "id": "bad87fee1348bd9aede08845", - "title": "Waypoint: Create a Custom Heading", + "title": "Create a Custom Heading", "difficulty": 2.11, "description": [ "We will make a simple heading for our Cat Photo App by putting them in the same row.", @@ -951,6 +961,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -965,7 +976,7 @@ }, { "id": "bad87fee1348bd9aedd08845", - "title": "Waypoint: Add Font Awesome Icons to our Buttons", + "title": "Add Font Awesome Icons to our Buttons", "difficulty": 2.12, "description": [ "Font Awesome is a convenient library of icons. These icons are vector graphics, stored in the \".svg\" file format. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements.", @@ -1035,6 +1046,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1049,7 +1061,7 @@ }, { "id": "bad87fee1348bd9aedc08845", - "title": "Waypoint: Add Font Awesome Icons to all of our Buttons", + "title": "Add Font Awesome Icons to all of our Buttons", "difficulty": 2.13, "description": [ "Font Awesome is a convenient library of icons. These icons are vector graphics, stored in the \".svg\" file format. These icons are treated just like fonts. You can specify their size using pixels, and they will assume the font size of their parent HTML elements.", @@ -1119,6 +1131,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1133,7 +1146,7 @@ }, { "id": "bad87fee1348bd9aedb08845", - "title": "Waypoint: Responsively Style Radio Buttons", + "title": "Responsively Style Radio Buttons", "difficulty": 2.14, "description": [ "You can use Bootstrap's \"col-xs-*\" classes on form elements, too! This way, our radio buttons will be evenly spread out across the page, regardless of how wide the screen resolution is.", @@ -1203,6 +1216,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1217,7 +1231,7 @@ }, { "id": "bad87fee1348bd9aeda08845", - "title": "Waypoint: Responsively Style Checkboxes", + "title": "Responsively Style Checkboxes", "difficulty": 2.15, "description": [ "You can use Bootstrap's \"col-xs-*\" classes on form elements, too! This way, our checkboxes will be evenly spread out across the page, regardless of how wide the screen resolution is.", @@ -1294,6 +1308,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1308,7 +1323,7 @@ }, { "id": "bad87fee1348bd9aed908845", - "title": "Waypoint: Style Text Inputs as Form Controls", + "title": "Style Text Inputs as Form Controls", "difficulty": 2.16, "description": [ "You can add the \"fa-paper-plane\" Font Awesome icon by adding <i class=\"fa fa-paper-plane\"></i> within your submit button element.", @@ -1394,6 +1409,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1408,7 +1424,7 @@ }, { "id": "bad87fee1348bd9aec908845", - "title": "Waypoint: Line up Form Elements Responsively with Bootstrap", + "title": "Line up Form Elements Responsively with Bootstrap", "difficulty": 2.17, "description": [ "Now let's get your form input and your submission button on the same line. We'll do this the same way we have previously: by using a div element with the class \"row\", and other div elements within it using the \"col-xs-*\" class.", @@ -1495,6 +1511,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1509,7 +1526,7 @@ }, { "id": "bad87fee1348bd9aec908846", - "title": "Waypoint: Create a Bootstrap Headline", + "title": "Create a Bootstrap Headline", "difficulty": 2.18, "description": [ "Now let's build something from scratch to practice our HTML, CSS and Bootstrap skills.", @@ -1529,6 +1546,7 @@ "", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1543,7 +1561,7 @@ }, { "id": "bad87fee1348bd9aec908746", - "title": "Waypoint: House our page within a Bootstrap Container Fluid Div", + "title": "House our page within a Bootstrap Container Fluid Div", "difficulty": 2.18, "description": [ "Now let's make sure all the content on your page is mobile-responsive.", @@ -1558,6 +1576,7 @@ "", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1572,7 +1591,7 @@ }, { "id": "bad87fee1348bd9bec908846", - "title": "Waypoint: Create a Bootstrap Row", + "title": "Create a Bootstrap Row", "difficulty": 2.19, "description": [ "Now we'll create a Bootstrap row for our inline elements.", @@ -1590,6 +1609,7 @@ "", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1604,7 +1624,7 @@ }, { "id": "bad87fee1348bd9aec908847", - "title": "Waypoint: Split your Bootstrap Row", + "title": "Split your Bootstrap Row", "difficulty": 2.20, "description": [ "Now that we have a Bootstrap Row, let's split it into two columns to house our elements.", @@ -1621,6 +1641,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1635,7 +1656,7 @@ }, { "id": "bad87fee1348bd9aec908848", - "title": "Waypoint: Create Bootstrap Wells", + "title": "Create Bootstrap Wells", "difficulty": 2.21, "description": [ "Bootstrap has a class called \"well\" that can create a visual sense of depth for your columns.", @@ -1658,6 +1679,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1672,7 +1694,7 @@ }, { "id": "bad87fee1348bd9aec908849", - "title": "Waypoint: Add Elements within your Bootstrap Wells", + "title": "Add Elements within your Bootstrap Wells", "difficulty": 2.22, "description": [ "Now we're several div elements deep on each column of our row. This is as deep as we'll need to go. Now we can add our button elements.", @@ -1697,6 +1719,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1711,7 +1734,7 @@ }, { "id": "bad87fee1348bd9aec908850", - "title": "Waypoint: Apply the Default Bootstrap Button Style", + "title": "Apply the Default Bootstrap Button Style", "difficulty": 2.23, "description": [ "Bootstrap has another button class called \"btn-default\"", @@ -1742,6 +1765,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1756,7 +1780,7 @@ }, { "id": "bad87fee1348bd9aec908852", - "title": "Waypoint: Create a Class to Target with jQuery Selectors", + "title": "Create a Class to Target with jQuery Selectors", "difficulty": 2.24, "description": [ "Not every class needs to have corresponding CSS. Sometimes we create classes just for the purpose of selecting these elements more easily using jQuery.", @@ -1786,6 +1810,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1800,7 +1825,7 @@ }, { "id": "bad87fee1348bd9aec908853", - "title": "Waypoint: Add ID Attributes to Bootstrap Elements", + "title": "Add ID Attributes to Bootstrap Elements", "difficulty": 2.25, "description": [ "Recall that in addition to class attributes, you can give each of your elements an id attribute.", @@ -1834,6 +1859,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1848,7 +1874,7 @@ }, { "id": "bad87fee1348bd9aec908854", - "title": "Waypoint: Label Bootstrap Wells", + "title": "Label Bootstrap Wells", "difficulty": 2.26, "description": [ "For the sake of clarity, let's label both of our wells with their ids.", @@ -1881,6 +1907,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1895,7 +1922,7 @@ }, { "id": "bad87fee1348bd9aec908855", - "title": "Waypoint: Give Each Element a Unique ID", + "title": "Give Each Element a Unique ID", "difficulty": 2.27, "description": [ "We will also want to be able to use jQuery to target each button by its unique id.", @@ -1932,6 +1959,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1946,7 +1974,7 @@ }, { "id": "bad87fee1348bd9aec908856", - "title": "Waypoint: Label Bootstrap Buttons", + "title": "Label Bootstrap Buttons", "difficulty": 2.28, "description": [ "Just like we labled our wells, we want to label our buttons.", @@ -1983,6 +2011,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1997,7 +2026,7 @@ }, { "id": "bad87fee1348bd9aec908857", - "title": "Waypoint: Use Comments to Clarify Code", + "title": "Use Comments to Clarify Code", "difficulty": 2.29, "description": [ "When we start using jQuery, we will modify HTML elements without needing to actually change them in HTML.", @@ -2033,6 +2062,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], diff --git a/challenges/expert-bonfires.json b/challenges/expert-bonfires.json index 8c5af398f0..06ab698fb1 100644 --- a/challenges/expert-bonfires.json +++ b/challenges/expert-bonfires.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "aff0395860f5d3034dc0bfc9", - "title": "Bonfire: Validate US Telephone Numbers", + "title": "Validate US Telephone Numbers", "difficulty": "4.01", "description": [ "Return true if the passed string is a valid US phone number", @@ -50,6 +50,7 @@ "MDNlinks": [ "RegExp" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -64,7 +65,7 @@ }, { "id": "a3f503de51cf954ede28891d", - "title": "Bonfire: Symmetric Difference", + "title": "Symmetric Difference", "difficulty": "4.02", "description": [ "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", @@ -88,6 +89,7 @@ "Array.reduce()", "Symmetric Difference" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -102,7 +104,7 @@ }, { "id": "aa2e6f85cab2ab736c9a9b24", - "title": "Bonfire: Exact Change", + "title": "Exact Change", "difficulty": "4.03", "description": [ "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", @@ -143,6 +145,7 @@ "MDNlinks": [ "Global Object" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -157,7 +160,7 @@ }, { "id": "a56138aff60341a09ed6c480", - "title": "Bonfire: Inventory Update", + "title": "Inventory Update", "difficulty": "4.04", "description": [ "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", @@ -197,6 +200,7 @@ "MDNlinks": [ "Global Array Object" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -211,7 +215,7 @@ }, { "id": "a7bf700cd123b9a54eef01d5", - "title": "Bonfire: No repeats please", + "title": "No repeats please", "difficulty": "4.05", "description": [ "Return the number of total permutations of the provided string that don't have repeated consecutive letters.", @@ -238,6 +242,7 @@ "Permutations", "RegExp" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -252,7 +257,7 @@ }, { "id": "a19f0fbe1872186acd434d5a", - "title": "Bonfire: Friendly Date Ranges", + "title": "Friendly Date Ranges", "difficulty": "4.06", "description": [ "Implement a way of converting two dates into a more friendly date range that could be presented to a user.", @@ -282,6 +287,7 @@ "String.substr()", "parseInt()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], diff --git a/challenges/get-set-for-free-code-camp.json b/challenges/get-set-for-free-code-camp.json index 12763352f8..74a1776d4d 100644 --- a/challenges/get-set-for-free-code-camp.json +++ b/challenges/get-set-for-free-code-camp.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7124d8c441eddfaeb5bdef", - "title": "Waypoint: Learn how Free Code Camp Works", + "title": "Learn how Free Code Camp Works", "difficulty": 0.01, "challengeSeed": ["125407438"], "description": [ @@ -20,6 +20,7 @@ "We'll provide you with the most rigorous curriculum and the most supportive community on earth. All you need to do sit down, day after day, and put in the hard work.", "Now it's time to join our chat room. Click the \"I've completed this challenge\" button to move on to your next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -55,7 +56,7 @@ }, { "id": "bd7125d8c441eddfaeb5bd0f", - "title": "Waypoint: Join Our Chat Room", + "title": "Join Our Chat Room", "difficulty": 0.02, "challengeSeed": ["131574135"], "description": [ @@ -77,6 +78,7 @@ "In order to keep our community a friendly and positive place to learn to code, please read and follow our Code of Conduct: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct", "Now you're ready to move on. Click the \"I've completed this challenge\" button to move on to your next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -116,7 +118,7 @@ }, { "id": "bd7125d8c441eddfaeb5bdff", - "title": "Waypoint: Preview our Challenge Map", + "title": "Preview our Challenge Map", "difficulty": 0.03, "challengeSeed": ["125407437"], "description": [ @@ -126,6 +128,7 @@ "In addition to our Waypoint challenges, like the one you're doing now, we have algorithm practice challenges (Bonfires), front end development challenges (Ziplines) and full stack development challenges (Basejumps). After you finish all of these, you'll start building projects for nonprofits.", "Please note that our open-source curriculum is a work in progress. Our volunteer community is constantly improving it. If you think you've encountered a bug, typo, or something that seems confusing, be sure to click the \"bug\" button to create a GitHub issue." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -157,7 +160,7 @@ }, { "id": "bd7125d8c441eddfaeb5bd1f", - "title": "Waypoint: Browse our Wiki", + "title": "Browse our Wiki", "difficulty": 0.04, "challengeSeed": ["125407435"], "description": [ @@ -167,6 +170,7 @@ "All of our Wiki articles are contributed by our community. You can update our wiki articles, and even create wiki articles of your own.", "Now you can move on to your next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -196,7 +200,7 @@ }, { "id": "bd7125d8c441eddfaeb5bd2f", - "title": "Waypoint: Customize your Portfolio Page", + "title": "Customize your Portfolio Page", "difficulty": 0.05, "challengeSeed": ["125407433"], "description": [ @@ -208,6 +212,7 @@ "Your portfolio page also shows off your progress through Free Code Camp. If you get Brownie Points on several days in a row, you'll get streak.", "Once you're happy with your portfolio page, you can move on to your next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -241,7 +246,7 @@ }, { "id": "bd7126d8c441eddfaeb5bd3f", - "title": "Waypoint: Try Camper News", + "title": "Try Camper News", "difficulty": 0.06, "challengeSeed": ["124553410"], "description": [ @@ -254,6 +259,7 @@ "When you submit a link, you'll get a Brownie Point. You'll also get a Brownie Point each time someone upvotes your link.", "Now that you've learned how to use Camper News, let's move on to your next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -291,7 +297,7 @@ }, { "id": "bd7126d8c441eddfaeb5bd3e", - "title": "Waypoint: Meet Other Campers in your City", + "title": "Meet Other Campers in your City", "difficulty": 0.07, "challengeSeed": ["127358841"], "description": [ @@ -303,6 +309,7 @@ "Our Campsites allow you to create events, coordinate those events, and share photos from the events afterward.", "Whether you're hosting a study group, pair programming at your local library, or going to a weekend hackathon, your city's Campsite will help you make it happen." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -338,7 +345,7 @@ }, { "id": "bd7126d8c431eddfaeb5bd3e", - "title": "Waypoint: Add Free Code Camp to your LinkedIn Profile", + "title": "Add Free Code Camp to your LinkedIn Profile", "difficulty": 0.08, "challengeSeed": ["131574134"], "description": [ @@ -353,6 +360,7 @@ "Make your LinkedIn profile as complete as possible. Unlike other social networks, with LinkedIn, it's perfectly fine if you don't want to add a photo.", "Let's keep moving. We're almost ready to start coding!" ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -368,7 +376,7 @@ }, { "id": "bd7137d8c441eddfaeb5bdef", - "title": "Waypoint: Get Help the Hacker Way with RSAP", + "title": "Get Help the Hacker Way with RSAP", "difficulty": 0.09, "challengeSeed": ["125407432"], "description": [ @@ -381,6 +389,7 @@ "Here's our detailed wiki article on getting help: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck.", "Now you have a clear algorithm to follow when you need help! Let's start coding! Move on to your next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", diff --git a/challenges/git.json b/challenges/git.json index e87eb4bbdf..3141e65112 100644 --- a/challenges/git.json +++ b/challenges/git.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7353d8c341eddeaeb5bd0f", - "title": "Waypoint: Save your Code Revisions Forever with Git", + "title": "Save your Code Revisions Forever with Git", "difficulty": 0.01, "challengeSeed": ["133316034"], "description": [ @@ -34,6 +34,7 @@ "Complete \"Merge Tada!\"", "Once you've completed these steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", diff --git a/challenges/hikes.json b/challenges/hikes.json index 8855b0e6c3..e24da79d85 100644 --- a/challenges/hikes.json +++ b/challenges/hikes.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7128d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 1: The 4 Basic Parts of a Computer", + "title": "Computer Basics 1: The 4 Basic Parts of a Computer", "difficulty": 9.01, "challengeSeed": [ "132542064" @@ -24,6 +24,7 @@ "You can't get to the memory from the input or the output without the use of the CPU.", "So, just to review, we've got 4 basic parts of the computer: the input, the output, CPU, and memory." ], + "type": "hike", "challengeType": 6, "tests": [ ["The computer has 3 basic parts.", false, "The computer has 4 basic parts: input, output, CPU, and memory"], @@ -43,7 +44,7 @@ }, { "id": "bd7127d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 2: More Computer Hardware", + "title": "Computer Basics 2: More Computer Hardware", "difficulty": 9.02, "challengeSeed": [ "132542458" @@ -62,6 +63,7 @@ "So let's do a quick review.", "In addition to the four basic parts of input, output, CPU, and memory, we also usually have a motherboard, expansion cards, and a power supply." ], + "type": "hike", "challengeType": 6, "tests": [ ["The power supply isn't a necessary part of a computer since it's not one of the 4 main parts.", false, "The computer needs power!"], @@ -81,7 +83,7 @@ }, { "id": "bd7126d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 3: Intro to Binary Code", + "title": "Computer Basics 3: Intro to Binary Code", "difficulty": 9.03, "challengeSeed": [ "132542757" @@ -95,6 +97,7 @@ "We're going to go into how you decode a number in binary, but as you can probably guess, translating binary can be done with a quick google search.", "The most important part of this is you undrestand the concept that even simple things like 1's and 0's can translate into something really complex that is the basis for all of the computer languages that exist today." ], + "type": "hike", "challengeType": 6, "tests": [ ["1's and 0's are how we talk about little switches being on and off.", true], @@ -114,7 +117,7 @@ }, { "id": "bd7125d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 4: Decoding a Binary Number", + "title": "Computer Basics 4: Decoding a Binary Number", "difficulty": 9.04, "challengeSeed": [ "132543332" @@ -130,6 +133,7 @@ "If it's a 0, we disregard it.", "In this video, our number adds up to 75." ], + "type": "hike", "challengeType": 6, "tests": [ ["1 === on and 0 ===off", true], @@ -149,7 +153,7 @@ }, { "id": "bd7124d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 5: How To Measure Data Size", + "title": "Computer Basics 5: How To Measure Data Size", "difficulty": 9.05, "challengeSeed": [ "132543959" @@ -168,6 +172,7 @@ "Then it's Gigabyte, 1024 Bytes to the power of three; Terabyte, 1024 Bytes to the power of 4, and Petabyte, 1024 to the power of 5.", "These get much bigger really quickly!" ], + "type": "hike", "challengeType": 6, "tests": [ ["A Byte is the smallest possible amount of data.", false, "A Byte is 8 bits."], @@ -187,7 +192,7 @@ }, { "id": "bd7123d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 6: Measuring Data Speed", + "title": "Computer Basics 6: Measuring Data Speed", "difficulty": 9.06, "challengeSeed": [ "132545171" @@ -205,6 +210,7 @@ "The main takeaway here is that speed is usually measured in bits and size is measured in Bytes.", "Additionally, if you have an internet speed that says however many bits per second, keep in mind they are talking about something 8 times less than Bytes, how you are thinking about data." ], + "type": "hike", "challengeType": 6, "tests": [ ["Data speed is measured in bits.", true], @@ -223,7 +229,7 @@ }, { "id": "bd7122d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 7: Binary Bytes", + "title": "Computer Basics 7: Binary Bytes", "difficulty": 9.07, "challengeSeed": [ "132545417" @@ -237,6 +243,7 @@ "So, all of the numbers, letters, and symbols in your javascript can be translated.", "There are a lot of languages that computers can work with, and what I want you to get away from this video is that all data in your computer boils down to binary Bytes." ], + "type": "hike", "challengeType": 6, "tests": [ ["All digits, letters, and symbols have a binary Byte translation.", true], @@ -256,7 +263,7 @@ }, { "id": "bd7121d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 8: Types of Computers", + "title": "Computer Basics 8: Types of Computers", "difficulty": 9.08, "challengeSeed": [ "132546182" @@ -275,6 +282,7 @@ "It's both a Mac and a PC.", "The last type of computer we'll talk about is a microcontroller, the type of computer you might have in your car that is really good at a small specialized task, but wouldn't be used the same way a PC would be." ], + "type": "hike", "challengeType": 6, "tests": [ ["The most common type of computer is a Personal Computer, a PC.", true], @@ -294,7 +302,7 @@ }, { "id": "bd7120d8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 9: More on the Motherboard", + "title": "Computer Basics 9: More on the Motherboard", "difficulty": 9.09, "challengeSeed": [ "132547285" @@ -315,6 +323,7 @@ "On your computer, you probably know there's a place to connect USB, firewire, SD card, ethernet, even an audio plug-in to listen through headphones.", "These are all considered ports, a place on the motherboard where you can connect the CPU to some outside source to either get or give information." ], + "type": "hike", "challengeType": 6, "tests": [ ["A motherboard must connect the CPU, the memory, and the network.", false, "A motherboard is a motherboard as long as it connects the CPU and the memory."], @@ -334,7 +343,7 @@ }, { "id": "bd712fd8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 10: Data Networks", + "title": "Computer Basics 10: Data Networks", "difficulty": 9.10, "challengeSeed": [ "132547590" @@ -354,6 +363,7 @@ "You might think that these are connected over the internet, and in the case of a VPN (Virtual Private Network, which is basically the same conceptionally as a WAN), you're right.", "However, a WAN usually rents a cable from an internet company to creat the connection." ], + "type": "hike", "challengeType": 6, "tests": [ ["You can connect to a LAN from far away.", false, "To connect to a LAN you must be physically near to it."], @@ -373,7 +383,7 @@ }, { "id": "bd712ed8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 11: IP Addresses", + "title": "Computer Basics 11: IP Addresses", "difficulty": 9.11, "challengeSeed": [ "132548071" @@ -393,6 +403,7 @@ "However, it is specific enough that you could google \"Where's the best ice cream near me\" and google could give you information close to your location.", "This is done using your IP address." ], + "type": "hike", "challengeType": 6, "tests": [ ["IP addresses are necessary to use and participate in the internet.", true], @@ -411,7 +422,7 @@ }, { "id": "bd712dd8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 12: How the Internet Works", + "title": "Computer Basics 12: How the Internet Works", "difficulty": 9.12, "challengeSeed": [ "132548579" @@ -431,6 +442,7 @@ "Now, this explaination is really quite basic.", "For more information, check out web.stanford.edu/class/msande91si/www-spr04/readings/week1/InternetWhitepaper.htm." ], + "type": "hike", "challengeType": 6, "tests": [ ["Your computer sends a request for information.", true], @@ -449,7 +461,7 @@ }, { "id": "bd712cd8c441eddfbeb5bddf", - "title": "Hike: Computer Basics 13: Software", + "title": "Computer Basics 13: Software", "difficulty": 9.13, "challengeSeed": [ "132548908" @@ -464,6 +476,7 @@ "There are three main operating systems: Windows, Mac, and Linux.", "Applications comprise all other software, like your web browser, games, things like Photoshop, how you view your mail, editing documents, etc." ], + "type": "hike", "challengeType": 6, "tests": [ ["Safari, Chrome, and Firefox are all examples of application software.", true] @@ -481,7 +494,7 @@ }, { "id": "bd712bd8c441eddfbeb5bddf", - "title": "Hike: What Do Programmers Do?", + "title": "What Do Programmers Do?", "difficulty": 9.14, "challengeSeed": [ "133166912" @@ -498,6 +511,7 @@ "Computers just read straight down like you would read a book.", "Programmers are the ones responsible for breaking their ideas down into the little tiny steps and writing them in a way that computers can understand them." ], + "type": "hike", "challengeType": 6, "tests": [ ["Computers look at code one line at a time", true], @@ -517,7 +531,7 @@ }, { "id": "bd712ad8c441eddfbeb5bddf", - "title": "Hike: Console and Logging", + "title": "Console and Logging", "difficulty": 9.15, "challengeSeed": [ "133170880" @@ -535,6 +549,7 @@ "This will also work with numbers and booleans, which are true/false statements.", "When consoling words, it's important to put it inside of quotations so it recognizes it's a string." ], + "type": "hike", "challengeType": 6, "tests": [ ["The console serves only small, unnecessary purposes.", false, "The console's main purpose is to debug, which is a vital step in creating code."], @@ -553,7 +568,7 @@ }, { "id": "bd7119d8c441eddfbeb5bddf", - "title": "Hike: Variables In Code", + "title": "Variables In Code", "difficulty": 9.16, "challengeSeed": [ "133172920" @@ -567,6 +582,7 @@ "But be careful - if we put console.log(\"x\"), with the x in quotation marks, it will output the letter \"x\".", "What I want you to take away from this video is that variables exist in code, and you can store everything from a simple string all the way up to a function, all within a simple name." ], + "type": "hike", "challengeType": 6, "tests": [ ["Variables are useful in coding languages like JavaScript.", true], @@ -585,7 +601,7 @@ }, { "id": "bd7029d8c441eddfbeb5bddf", - "title": "Hike: Source Code", + "title": "Source Code", "difficulty": 9.17, "challengeSeed": [ "133177129" @@ -610,6 +626,7 @@ "It's a great way for websites and software to grow in a strong and fast way because of the community working together to improve it.", "One unwritten rule of contributing to open source projects is that you should generally submit your improvements to also be open source, and by giving that improvement back to the public, you let others use your improvement as well." ], + "type": "hike", "challengeType": 6, "tests": [ ["Source code is a text document.", true], @@ -629,7 +646,7 @@ }, { "id": "bd7129d8b441eddfbeb5bddf", - "title": "Hike: Routers and Packets", + "title": "Routers and Packets", "difficulty": 9.18, "challengeSeed": [ "133181251" @@ -660,6 +677,7 @@ "They can take whichever route is open, whichever is fastest, and since they have the end IP address, all of the routers know where to send them.", "Once they get to the end destination, that computer knows how to put all of the information back together." ], + "type": "hike", "challengeType": 6, "tests": [ ["Routers have to know the whole internet.", false, "Routers just have to know the stops around them to send information in the right direction."], @@ -679,7 +697,7 @@ }, { "id": "bd7129d8a441eddfbeb5bddf", - "title": "Hike: Hardware: Chips and Moore's Law", + "title": "Hardware: Chips and Moore's Law", "difficulty": 9.19, "challengeSeed": [ "133182057" @@ -696,6 +714,7 @@ "Moore's Law is the observation that the amount of transistors fit on each chip has doubled every two years since 1965.", "This is important because it's making technology more affordable and accessible." ], + "type": "hike", "challengeType": 6, "tests": [ ["Chips have transistors, little switches that can store a 1 or a 0.", true], @@ -715,7 +734,7 @@ }, { "id": "bd7129d80441eddfbeb5bddf", - "title": "Hike: Analog vs Digital and File Compression", + "title": "Analog vs Digital and File Compression", "difficulty": 9.20, "challengeSeed": [ "133182587" @@ -735,6 +754,7 @@ "In images, it's done by measuring groups of pixels by 16 instead of individually.", "The takeaway from this video is that you'll want to use digital files as they're a higher quality, and when you're looking at compression, you want to decide how far you are willing to go to ensure the user still has the best possible experience." ], + "type": "hike", "challengeType": 6, "tests": [ ["Digital files can be made from analog sounds and analog sounds can be made from digital files.", true], @@ -753,7 +773,7 @@ }, { "id": "bd7129d89441eddfbeb5bddf", - "title": "Hike: Computer Security", + "title": "Computer Security", "difficulty": 9.21, "challengeSeed": [ "133186284" @@ -787,6 +807,7 @@ "Those bugs have been patched in newer versions, so if you keep everything updated, you'll avoid lots of problems.", "These are all very basic things you should know about how to keep your information safe on your computer." ], + "type": "hike", "challengeType": 6, "tests": [ ["Passwords should be shared with all of your accounts.", false, "Don't reuse important passwords"], diff --git a/challenges/html5-and-css.json b/challenges/html5-and-css.json index 77df5f408a..2ceadb9322 100644 --- a/challenges/html5-and-css.json +++ b/challenges/html5-and-css.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7123c8c441eddfaeb5bdef", - "title": "Waypoint: Say Hello to HTML Elements", + "title": "Say Hello to HTML Elements", "difficulty": 1.01, "description": [ "Welcome to Free Code Camp's first coding challenge!", @@ -20,6 +20,7 @@ "challengeSeed": [ "

Hello

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -52,7 +53,7 @@ }, { "id": "bad87fee1348bd9aedf0887a", - "title": "Waypoint: Headline with the h2 Element", + "title": "Headline with the h2 Element", "difficulty": 1.02, "description": [ "Add an h2 tag that says \"CatPhotoApp\" to create a second HTML element below your \"Hello World\" h1 element.", @@ -69,6 +70,7 @@ "challengeSeed": [ "

Hello World

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -95,7 +97,7 @@ }, { "id": "bad87fee1348bd9aedf08801", - "title": "Waypoint: Inform with the Paragraph Element", + "title": "Inform with the Paragraph Element", "difficulty": 1.03, "description": [ "Create a p element below your h2 element, and give it the text \"Hello Paragraph\".", @@ -111,6 +113,7 @@ "

Hello World

", "

CatPhotoApp

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -135,7 +138,7 @@ }, { "id": "bad87fee1348bd9aedf08802", - "title": "Waypoint: Uncomment HTML", + "title": "Uncomment HTML", "difficulty": 1.04, "description": [ "Uncomment your h1, h2 and p elements.", @@ -158,6 +161,7 @@ "

Hello Paragraph

", "-->" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -184,7 +188,7 @@ }, { "id": "bad87fee1348bd9aedf08804", - "title": "Waypoint: Comment out HTML", + "title": "Comment out HTML", "difficulty": 1.05, "description": [ "Comment out your h1 element and your p element, but leave your h2 element uncommented.", @@ -206,6 +210,7 @@ "

Hello Paragraph

", "-->" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -230,7 +235,7 @@ }, { "id": "bad87fee1348bd9aedf08833", - "title": "Waypoint: Fill in the Blank with Placeholder Text", + "title": "Fill in the Blank with Placeholder Text", "difficulty": 1.06, "description": [ "Web developers traditionally use \"Lorem Ipsum\" text as placeholder text. It's called \"Lorem Ipsum\" text because those are the first two words of a famous passage by Cicero of Ancient Rome.", @@ -248,6 +253,7 @@ "", "

Hello Paragraph

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -276,7 +282,7 @@ }, { "id": "bad87fed1348bd9aedf08833", - "title": "Waypoint: Delete HTML Elements", + "title": "Delete HTML Elements", "difficulty": 1.07, "description": [ "Delete your h1 element so we can simplify our view.", @@ -295,6 +301,7 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -319,7 +326,7 @@ }, { "id": "bad87fee1348bd9aedf08803", - "title": "Waypoint: Change the Color of Text", + "title": "Change the Color of Text", "difficulty": 1.08, "description": [ "Change your h2 element's style so that its text color is red.", @@ -335,6 +342,7 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -360,7 +368,7 @@ }, { "id": "bad87fee1348bd9aedf08805", - "title": "Waypoint: Use CSS Selectors to Style Elements", + "title": "Use CSS Selectors to Style Elements", "difficulty": 1.09, "description": [ "Delete your h2 element's style attribute and instead create a CSS style element. Add the necessary CSS to turn all h2 elements blue.", @@ -382,6 +390,7 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -414,7 +423,7 @@ }, { "id": "bad87fee1348bd9aecf08806", - "title": "Waypoint: Use a CSS Class to Style an Element", + "title": "Use a CSS Class to Style an Element", "difficulty": 1.11, "description": [ "Create a CSS class called \"red-text\" and apply it to your h2 element.", @@ -442,6 +451,7 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -467,7 +477,7 @@ }, { "id": "bad87fee1348bd9aefe08806", - "title": "Waypoint: Style Multiple Elements with a CSS Class", + "title": "Style Multiple Elements with a CSS Class", "difficulty": 1.12, "description": [ "Apply the \"red-text\" class to your h2 and p elements.", @@ -491,6 +501,7 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -511,7 +522,7 @@ }, { "id": "bad87fee1348bd9aedf08806", - "title": "Waypoint: Change the Font Size of an Element", + "title": "Change the Font Size of an Element", "difficulty": 1.13, "description": [ "Create a second p element with the following Kitty Ipsum text: Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.", @@ -536,6 +547,7 @@ "", "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -557,7 +569,7 @@ }, { "id": "bad87fee1348bd9aede08807", - "title": "Waypoint: Set the Font Family of an Element", + "title": "Set the Font Family of an Element", "difficulty": 1.14, "description": [ "Make all of your p elements use the \"Monospace\" font.", @@ -583,6 +595,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -603,7 +616,7 @@ }, { "id": "bad87fee1348bd9aedf08807", - "title": "Waypoint: Import a Google Font", + "title": "Import a Google Font", "difficulty": 1.15, "description": [ "Apply the font-family of \"Lobster\" to your h2 element.", @@ -634,6 +647,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -656,7 +670,7 @@ }, { "id": "bad87fee1348bd9aedf08808", - "title": "Waypoint: Specify How Fonts Should Degrade", + "title": "Specify How Fonts Should Degrade", "difficulty": 1.16, "description": [ "There are several default fonts that are available in all browsers. These include \"Monospace\", \"Serif\" and \"Sans-Serif\". Leave \"Lobster\" as the font-family for your h2 elements. Make them \"degrade\" to \"Monospace\" when \"Lobster\" isn't available.", @@ -691,6 +705,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -713,7 +728,7 @@ }, { "id": "bad87fee1348bd9aedf08812", - "title": "Waypoint: Add Images to your Website", + "title": "Add Images to your Website", "difficulty": 1.17, "description": [ "You can add images to your website by using the img element, and point to an specific image's URL using the src attribute.", @@ -746,6 +761,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -767,7 +783,7 @@ }, { "id": "bad87fee1348bd9acdf08812", - "title": "Waypoint: Size your Images", + "title": "Size your Images", "difficulty": 1.18, "description": [ "CSS has an attribute called width that controls an element's width. Just like with fonts, we'll use pixels(px) to specify the image's width.", @@ -802,6 +818,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -822,7 +839,7 @@ }, { "id": "bad87fee1348bd9bedf08813", - "title": "Waypoint: Add Borders Around your Elements", + "title": "Add Borders Around your Elements", "difficulty": 1.19, "description": [ "CSS borders have attributes like style, color and width.", @@ -864,6 +881,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -884,7 +902,7 @@ }, { "id": "bad87fee1348bd9aedf08814", - "title": "Waypoint: Add Rounded Corners with a Border Radius", + "title": "Add Rounded Corners with a Border Radius", "difficulty": 1.20, "description": [ "Your cat photo currently has sharp corners. We can round out those corners with a CSS attribute called border-radius.", @@ -929,6 +947,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -949,7 +968,7 @@ }, { "id": "bad87fee1348bd9aedf08815", - "title": "Waypoint: Make Circular Images with a Border Radius", + "title": "Make Circular Images with a Border Radius", "difficulty": 1.21, "description": [ "In addition to pixels, you can also specify a border-radius using a percentage.", @@ -994,6 +1013,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1013,7 +1033,7 @@ }, { "id": "bad87fee1348bd9aedf08816", - "title": "Waypoint: Link to External Pages with Anchor Elements", + "title": "Link to External Pages with Anchor Elements", "difficulty": 1.22, "description": [ "a elements or \"anchor\" elements, are used to link to content outside of the current page.", @@ -1062,6 +1082,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1083,7 +1104,7 @@ }, { "id": "bad87fee1348bd9aede08817", - "title": "Waypoint: Nest an Anchor Element within a Paragraph", + "title": "Nest an Anchor Element within a Paragraph", "difficulty": 1.23, "description": [ "Again, here's a diagram of an a element for your reference:", @@ -1138,6 +1159,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1158,7 +1180,7 @@ }, { "id": "bad87fee1348bd9aedf08817", - "title": "Waypoint: Make Dead Links using the Hash Symbol", + "title": "Make Dead Links using the Hash Symbol", "difficulty": 1.24, "description": [ "Sometimes you want to add a elements to your website before you know where they will link.", @@ -1205,6 +1227,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1226,7 +1249,7 @@ }, { "id": "bad87fee1348bd9aedf08820", - "title": "Waypoint: Turn an Image into a Link", + "title": "Turn an Image into a Link", "difficulty": 1.25, "description": [ "You can make elements into links by nesting them within an a element.", @@ -1276,6 +1299,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1298,7 +1322,7 @@ }, { "id": "bad87fee1348bd9aedf08818", - "title": "Waypoint: Add Alt Text to an Image for Accessibility", + "title": "Add Alt Text to an Image for Accessibility", "difficulty": 1.26, "description": [ "alt attributes, also known as \"alt text\", are what browsers will display if they fail to load the image. alt attributes are also important for blind or visually impaired users to understand what an image portrays. And search engines also look at alt attributes.", @@ -1346,6 +1370,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1368,7 +1393,7 @@ }, { "id": "bad87fee1348bd9aedf08827", - "title": "Waypoint: Create a Bulleted Unordered List", + "title": "Create a Bulleted Unordered List", "difficulty": 1.27, "description": [ "HTML has a special element for creating unordered lists, or bullet point-style lists.", @@ -1424,6 +1449,7 @@ "

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

", "

Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1445,7 +1471,7 @@ }, { "id": "bad87fee1348bd9aedf08828", - "title": "Waypoint: Create an Ordered List", + "title": "Create an Ordered List", "difficulty": 1.28, "description": [ "HTML has a special element for creating ordered lists, or numbered-style lists.", @@ -1504,6 +1530,7 @@ "", "

Top 3 things cats hate:

" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1525,7 +1552,7 @@ }, { "id": "bad87fee1348bd9aedf08829", - "title": "Waypoint: Create a Text Field", + "title": "Create a Text Field", "difficulty": 1.29, "description": [ "Now let's create a web form.", @@ -1583,6 +1610,7 @@ "
  • other cats
  • ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1603,7 +1631,7 @@ }, { "id": "bad87fee1348bd9aedf08830", - "title": "Waypoint: Add Placeholder Text to a Text Field", + "title": "Add Placeholder Text to a Text Field", "difficulty": 1.30, "description": [ "Your placeholder text is what appears in your text input before your user has inputed anything.", @@ -1662,6 +1690,7 @@ "", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1682,7 +1711,7 @@ }, { "id": "bad87fee1348bd9aede08830", - "title": "Waypoint: Create a Form Element", + "title": "Create a Form Element", "difficulty": 1.31, "description": [ "You can build web forms that actually submit data to a server using nothing more than pure HTML. You can do this by specifying an action on your form element.", @@ -1743,6 +1772,7 @@ "", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1763,7 +1793,7 @@ }, { "id": "bad87fee1348bd9aedd08830", - "title": "Waypoint: Add a Submit Button to a Form", + "title": "Add a Submit Button to a Form", "difficulty": 1.32, "description": [ "Let's add a submit button to your form. Clicking this button will send the data from your form to the URL you specified with your form's action attribute.", @@ -1826,6 +1856,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1846,7 +1877,7 @@ }, { "id": "bad87fee1348bd9aedc08830", - "title": "Waypoint: Use HTML5 to Require a Field", + "title": "Use HTML5 to Require a Field", "difficulty": 1.33, "description": [ "You can require specific form fields so that your user will not be able to submit your form until he or she has filled them out.", @@ -1907,6 +1938,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -1927,7 +1959,7 @@ }, { "id": "bad87fee1348bd9aedf08834", - "title": "Waypoint: Create a Set of Radio Buttons", + "title": "Create a Set of Radio Buttons", "difficulty": 1.34, "description": [ "You can use \"radio buttons\" for questions where you want the user to only give you one answer.", @@ -1996,6 +2028,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2019,7 +2052,7 @@ }, { "id": "bad87fee1348bd9aedf08835", - "title": "Waypoint: Create a Set of Checkboxes", + "title": "Create a Set of Checkboxes", "difficulty": 1.35, "description": [ "Forms commonly use \"checkboxes\" for questions that may have more than one answer.", @@ -2088,6 +2121,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2108,7 +2142,7 @@ }, { "id": "bad87fee1348bd9aedd08835", - "title": "Waypoint: Check Radio Buttons and Checkboxes by Default", + "title": "Check Radio Buttons and Checkboxes by Default", "difficulty": 1.37, "description": [ "You can set a checkbox or radio button to be checked by default using the checked attribute.", @@ -2175,6 +2209,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2195,7 +2230,7 @@ }, { "id": "bad87fee1348bd9aede08835", - "title": "Waypoint: Nest Many Elements within a Single Div Element", + "title": "Nest Many Elements within a Single Div Element", "difficulty": 1.38, "description": [ "The div element, or \"Division\" element, is a general purpose container for other elements.", @@ -2267,6 +2302,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2289,7 +2325,7 @@ }, { "id": "bad87fed1348bd9aede07836", - "title": "Waypoint: Give a Background Color to a Div Element", + "title": "Give a Background Color to a Div Element", "difficulty": 1.39, "description": [ "You can set an element's background color with the \"background-color\" attribute.", @@ -2359,6 +2395,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2375,7 +2412,7 @@ }, { "id": "bad87eee1348bd9aede07836", - "title": "Waypoint: Set the ID of an Element", + "title": "Set the ID of an Element", "difficulty": 1.391, "description": [ "In addition to classes, each HTML element can also have an id attribute.", @@ -2446,6 +2483,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2462,7 +2500,7 @@ }, { "id": "bad87dee1348bd9aede07836", - "title": "Waypoint: Use an ID Attribute to Style an Element", + "title": "Use an ID Attribute to Style an Element", "difficulty": 1.392, "description": [ "One cool thing about id attributes is that, like classes, you can style them using CSS.", @@ -2535,6 +2573,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2551,7 +2590,7 @@ }, { "id": "bad88fee1348bd9aedf08825", - "title": "Waypoint: Adjusting the Padding of an Element", + "title": "Adjusting the Padding of an Element", "difficulty": 1.40, "description": [ "You may have already noticed this, but all HTML elements are essentially little rectangles.", @@ -2600,6 +2639,7 @@ "
    padding
    ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2621,7 +2661,7 @@ }, { "id": "bad87fee1348bd9aedf08822", - "title": "Waypoint: Adjust the Margin of an Element", + "title": "Adjust the Margin of an Element", "difficulty": 1.41, "description": [ "An element's margin controls the amount of space between an element's border and surrounding elements.", @@ -2670,6 +2710,7 @@ "
    padding
    ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2691,7 +2732,7 @@ }, { "id": "bad87fee1348bd9aedf08823", - "title": "Waypoint: Add a Negative Margin to an Element", + "title": "Add a Negative Margin to an Element", "difficulty": 1.42, "description": [ "An element's margin controls the amount of space between an element's border and surrounding elements.", @@ -2739,6 +2780,7 @@ "
    padding
    ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2760,7 +2802,7 @@ }, { "id": "bad87fee1348bd9aedf08824", - "title": "Waypoint: Add Different Padding to Each Side of an Element", + "title": "Add Different Padding to Each Side of an Element", "difficulty": 1.43, "description": [ "Sometimes you will want to customize an element so that it has different padding on each of its sides.", @@ -2811,6 +2853,7 @@ "
    padding
    ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2831,7 +2874,7 @@ }, { "id": "bad87fee1248bd9aedf08824", - "title": "Waypoint: Add Different Margins to Each Side of an Element", + "title": "Add Different Margins to Each Side of an Element", "difficulty": 1.44, "description": [ "Give the green box a margin of 40 pixels on its top and left side, but only 20 pixels on its bottom and right side.", @@ -2882,6 +2925,7 @@ "
    padding
    ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2901,7 +2945,7 @@ }, { "id": "bad87fee1348bd9aedf08826", - "title": "Waypoint: Use Clockwise Notation to Specify the Padding of an Element", + "title": "Use Clockwise Notation to Specify the Padding of an Element", "difficulty": 1.44, "description": [ "Instead of specifying an element's padding-top, padding-right, padding-bottom, and padding-left attributes, you can specify them all in one line, like this: padding: 10px 20px 10px 20px;.", @@ -2949,6 +2993,7 @@ "
    padding
    ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -2969,7 +3014,7 @@ }, { "id": "bad87fee1348bd9afdf08726", - "title": "Waypoint: Use Clockwise Notation to Specify the Margin of an Element", + "title": "Use Clockwise Notation to Specify the Margin of an Element", "difficulty": 1.45, "description": [ "Let's try this again, but with margin this time.", @@ -3018,6 +3063,7 @@ "
    padding
    ", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3038,7 +3084,7 @@ }, { "id": "bad87fee1348bd9aedf08736", - "title": "Waypoint: Style the HTML Body Element", + "title": "Style the HTML Body Element", "difficulty": 1.46, "description": [ "Now let's start fresh and talk about CSS inheritance.", @@ -3054,6 +3100,7 @@ "", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3070,7 +3117,7 @@ }, { "id": "bad87fee1348bd9aedf08746", - "title": "Waypoint: Inherit Styles from the Body Element", + "title": "Inherit Styles from the Body Element", "difficulty": 1.47, "description": [ "Now we've proven that every HTML page has a body element, and that its body element can also be styled with CSS.", @@ -3096,6 +3143,7 @@ "", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3112,7 +3160,7 @@ }, { "id": "bad87fee1348bd9aedf08756", - "title": "Waypoint: Prioritize One Style Over Another", + "title": "Prioritize One Style Over Another", "difficulty": 1.48, "description": [ "Sometimes your HTML elements will receive multiple styles that conflict with one another.", @@ -3135,6 +3183,7 @@ "", "

    Hello World!

    " ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3151,7 +3200,7 @@ }, { "id": "bad87fee1348bd9aedf04756", - "title": "Waypoint: Override Styles in Subsequent CSS", + "title": "Override Styles in Subsequent CSS", "difficulty": 1.49, "description": [ "Our \"pink-text\" class overrode our body element's CSS declaration!", @@ -3177,6 +3226,7 @@ "", "

    Hello World!

    " ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3193,7 +3243,7 @@ }, { "id": "bad87fee1348bd8aedf06756", - "title": "Waypoint: Override Class Declarations by Styling ID Attributes", + "title": "Override Class Declarations by Styling ID Attributes", "difficulty": 1.52, "description": [ "We just proved that browsers read CSS from top to bottom. That means that, in the event of a conflict, the browser will use whichever CSS declaration came last.", @@ -3225,6 +3275,7 @@ "", "

    Hello World!

    " ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3241,7 +3292,7 @@ }, { "id": "bad87fee1348bd9aedf06756", - "title": "Waypoint: Override Class Declarations with Inline Styles", + "title": "Override Class Declarations with Inline Styles", "difficulty": 1.52, "description": [ "So we've proven that id declarations override class declarations, regardless of where they are declared in your style element CSS.", @@ -3275,6 +3326,7 @@ "", "

    Hello World!

    " ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3291,7 +3343,7 @@ }, { "id": "bad87fee1348bd9aedf07756", - "title": "Waypoint: Override All Other Styles by using Important", + "title": "Override All Other Styles by using Important", "difficulty": 1.53, "description": [ "Yay! We just proved that in-line styles will override all the CSS declarations in your style element.", @@ -3328,6 +3380,7 @@ "", "

    Hello World!

    " ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3344,7 +3397,7 @@ }, { "id": "bad87fee1348bd9aedf08726", - "title": "Waypoint: Use Hex Code for Specific Colors", + "title": "Use Hex Code for Specific Colors", "difficulty": 1.54, "description": [ "Did you know there other ways to represent colors in CSS? One of these ways is called hexadecimal code, or \"hex code\" for short.", @@ -3363,6 +3416,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3379,7 +3433,7 @@ }, { "id": "bad87fee1348bd9aedf08725", - "title": "Waypoint: Use Hex Code to Color Elements White", + "title": "Use Hex Code to Color Elements White", "difficulty": 1.55, "description": [ "0 is the lowest number in hex code, and represents a complete absence of color.", @@ -3397,6 +3451,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3413,7 +3468,7 @@ }, { "id": "bad87fee1348bd9aedf08724", - "title": "Waypoint: Use Hex Code to Color Elements Red", + "title": "Use Hex Code to Color Elements Red", "difficulty": 1.56, "description": [ "You may be wondering why we use 6 digits to represent a color instead of just one or two. The answer is that using 6 digits gives us a huge variety.", @@ -3433,6 +3488,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3449,7 +3505,7 @@ }, { "id": "bad87fee1348bd9aedf08723", - "title": "Waypoint: Use Hex Code to Color Elements Green", + "title": "Use Hex Code to Color Elements Green", "difficulty": 1.57, "description": [ "Remember that hex code follows the red-green-blue, or \"RGB\" format. The first two digits of hex code represent the amount of red in the color. The third and fourth digit represent the amount of green. The fifth and sixth represent the amount of blue.", @@ -3467,6 +3523,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3483,7 +3540,7 @@ }, { "id": "bad87fee1348bd9aedf08722", - "title": "Waypoint: Use Hex Code to Color Elements Blue", + "title": "Use Hex Code to Color Elements Blue", "difficulty": 1.58, "description": [ "Hex code follows the red-green-blue, or \"RGB\" format. The first two digits of hex code represent the amount of red in the color. The third and fourth digit represent the amount of green. The fifth and sixth represent the amount of blue.", @@ -3501,6 +3558,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3517,7 +3575,7 @@ }, { "id": "bad87fee1348bd9aedf08721", - "title": "Waypoint: Use Hex Code to Mix Colors", + "title": "Use Hex Code to Mix Colors", "difficulty": 1.59, "description": [ "From these three pure colors (red, green and blue), we can create 16 million other colors.", @@ -3535,6 +3593,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3551,7 +3610,7 @@ }, { "id": "bad87fee1348bd9aede08720", - "title": "Waypoint: Use Hex Code to Color Elements Gray", + "title": "Use Hex Code to Color Elements Gray", "difficulty": 1.60, "description": [ "From these three pure colors (red, green and blue), we can create 16 million other colors.", @@ -3569,6 +3628,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3585,7 +3645,7 @@ }, { "id": "bad87fee1348bd9aedf08720", - "title": "Waypoint: Use Hex Code for Specific Shades of Gray", + "title": "Use Hex Code for Specific Shades of Gray", "difficulty": 1.61, "description": [ "We can also create other shades of gray by evenly mixing all three colors. We can go very close to true black.", @@ -3602,6 +3662,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3618,7 +3679,7 @@ }, { "id": "bad87fee1348bd9aedf08719", - "title": "Waypoint: Use Abbreviated Hex Code", + "title": "Use Abbreviated Hex Code", "difficulty": 1.62, "description": [ "Many people feel overwhelmed by the possibilities of more than 16 million colors. And it's difficult to remember hex code. Fortunately, you can shorten it.", @@ -3637,6 +3698,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3653,7 +3715,7 @@ }, { "id": "bad87fee1348bd9aede08718", - "title": "Waypoint: Use RGB values to Color Elements", + "title": "Use RGB values to Color Elements", "difficulty": 1.63, "description": [ "Another way you can represent colors in CSS is by using RGB values.", @@ -3673,6 +3735,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3689,7 +3752,7 @@ }, { "id": "bad88fee1348bd9aedf08726", - "title": "Waypoint: Use RGB to Color Elements White", + "title": "Use RGB to Color Elements White", "difficulty": 1.64, "description": [ "RGB values look like this: rgb(0, 0, 0) for black and rgb(255, 255, 255) for white.", @@ -3707,6 +3770,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3723,7 +3787,7 @@ }, { "id": "bad89fee1348bd9aedf08724", - "title": "Waypoint: Use RGB to Color Elements Red", + "title": "Use RGB to Color Elements Red", "difficulty": 1.65, "description": [ "Just like with hex code, you can represent different colors in RGB by using combinations of different values.", @@ -3741,6 +3805,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3757,7 +3822,7 @@ }, { "id": "bad80fee1348bd9aedf08723", - "title": "Waypoint: Use RGB to Color Elements Green", + "title": "Use RGB to Color Elements Green", "difficulty": 1.66, "description": [ "Now change the body element's background color to the RGB value green: rgb(0, 255, 0)" @@ -3773,6 +3838,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3789,7 +3855,7 @@ }, { "id": "bad81fee1348bd9aedf08722", - "title": "Waypoint: Use RGB to Color Elements Blue", + "title": "Use RGB to Color Elements Blue", "difficulty": 1.67, "description": [ "Change the body element's background color to the RGB value blue: rgb(0, 0, 255)" @@ -3805,6 +3871,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3821,7 +3888,7 @@ }, { "id": "bad82fee1348bd9aedf08721", - "title": "Waypoint: Use RGB to Mix Colors", + "title": "Use RGB to Mix Colors", "difficulty": 1.68, "description": [ "Just like with hex code, you can mix colors in RGB by using combinations of different values.", @@ -3838,6 +3905,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], @@ -3854,7 +3922,7 @@ }, { "id": "bad83fee1348bd9aede08720", - "title": "Waypoint: Use RGB to Color Elements Gray", + "title": "Use RGB to Color Elements Gray", "difficulty": 1.69, "description": [ "With RGB values, we can make an element gray by using combinations of the same value for all three colors.", @@ -3871,6 +3939,7 @@ " }", "" ], + "type": "waypoint", "challengeType": 0, "nameCn": "", "descriptionCn": [], diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index b9e9882189..a85f6367e6 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "a3566b1109230028080c9345", - "title": "Bonfire: Sum All Numbers in a Range", + "title": "Sum All Numbers in a Range", "difficulty": "2.00", "description": [ "We'll pass you an array of two numbers. Return the sum of those two numbers and all numbers between them.", @@ -30,6 +30,7 @@ "Math.min()", "Array.reduce()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -44,7 +45,7 @@ }, { "id": "a5de63ebea8dbee56860f4f2", - "title": "Bonfire: Diff Two Arrays", + "title": "Diff Two Arrays", "difficulty": "2.01", "description": [ "Compare two arrays and return a new array with any items not found in both of the original arrays.", @@ -75,6 +76,7 @@ "Array.indexOf()", "String.concat()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -89,7 +91,7 @@ }, { "id": "a7f4d8f2483413a6ce226cac", - "title": "Bonfire: Roman Numeral Converter", + "title": "Roman Numeral Converter", "tests": [ "expect(convert(12)).to.equal(\"XII\");", "expect(convert(5)).to.equal(\"V\");", @@ -115,6 +117,7 @@ "Array.indexOf()", "Array.join()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -129,7 +132,7 @@ }, { "id": "a0b5010f579e69b815e7c5d6", - "title": "Bonfire: Search and Replace", + "title": "Search and Replace", "tests": [ "expect(replace(\"Let us go to the store\", \"store\", \"mall\")).to.equal(\"Let us go to the mall\");", "expect(replace(\"He is Sleeping on the couch\", \"Sleeping\", \"sitting\")).to.equal(\"He is Sitting on the couch\");", @@ -158,6 +161,7 @@ "String.replace()", "Array.join()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -172,7 +176,7 @@ }, { "id": "aa7697ea2477d1316795783b", - "title": "Bonfire: Pig Latin", + "title": "Pig Latin", "tests": [ "expect(translate(\"california\")).to.equal(\"aliforniacay\");", "expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");", @@ -201,6 +205,7 @@ "String.substr()", "String.split()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -215,7 +220,7 @@ }, { "id": "afd15382cdfb22c9efe8b7de", - "title": "Bonfire: DNA Pairing", + "title": "DNA Pairing", "tests": [ "assert.deepEqual(pair(\"ATCGA\"),[['A','T'],['T','A'],['C','G'],['G','C'],['A','T']], 'should return the dna pair');", "assert.deepEqual(pair(\"TTGAG\"),[['T','A'],['T','A'],['G','C'],['A','T'],['G','C']], 'should return the dna pair');", @@ -239,6 +244,7 @@ "Array.push()", "String.split()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -253,7 +259,7 @@ }, { "id": "af7588ade1100bde429baf20", - "title": "Bonfire: Missing letters", + "title": "Missing letters", "difficulty": "2.05", "description": [ "Find the missing letter in the passed letter range and return it.", @@ -277,6 +283,7 @@ "String.charCodeAt()", "String.fromCharCode()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -291,7 +298,7 @@ }, { "id": "a77dbc43c33f39daa4429b4f", - "title": "Bonfire: Boo who", + "title": "Boo who", "difficulty": "2.06", "description": [ "Check if a value is classified as a boolean primitive. Return true or false.", @@ -319,6 +326,7 @@ "MDNlinks": [ "Boolean Objects" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -333,7 +341,7 @@ }, { "id": "a105e963526e7de52b219be9", - "title": "Bonfire: Sorted Union", + "title": "Sorted Union", "difficulty": "2.07", "description": [ "Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.", @@ -359,6 +367,7 @@ "Arguments object", "Array.reduce()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -373,7 +382,7 @@ }, { "id": "a6b0bb188d873cb2c8729495", - "title": "Bonfire: Convert HTML Entities", + "title": "Convert HTML Entities", "difficulty": "2.07", "description": [ "Convert the characters \"&\", \"<\", \">\", '\"' (double quote), and \"'\" (apostrophe), in a string to their corresponding HTML entities.", @@ -400,6 +409,7 @@ "RegExp", "HTML Entities" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -414,7 +424,7 @@ }, { "id": "a103376db3ba46b2d50db289", - "title": "Bonfire: Spinal Tap Case", + "title": "Spinal Tap Case", "difficulty": "2.08", "description": [ "Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.", @@ -439,6 +449,7 @@ "RegExp", "String.replace()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -453,7 +464,7 @@ }, { "id": "a5229172f011153519423690", - "title": "Bonfire: Sum All Odd Fibonacci Numbers", + "title": "Sum All Odd Fibonacci Numbers", "difficulty": "2.09", "description": [ "Return the sum of all odd Fibonacci numbers up to and including the passed number if it is a Fibonacci number.", @@ -479,6 +490,7 @@ "MDNlinks": [ "Remainder" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -493,7 +505,7 @@ }, { "id": "a3bfc1673c0526e06d3ac698", - "title": "Bonfire: Sum All Primes", + "title": "Sum All Primes", "difficulty": "2.10", "description": [ "Sum all the prime numbers up to and including the provided number.", @@ -517,6 +529,7 @@ "For Loops", "Array.push()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -531,7 +544,7 @@ }, { "id": "ae9defd7acaf69703ab432ea", - "title": "Bonfire: Smallest Common Multiple", + "title": "Smallest Common Multiple", "difficulty": "2.11", "description": [ "Find the smallest number that is evenly divisible by all numbers in the provided range.", @@ -555,6 +568,7 @@ "MDNlinks": [ "Smallest Common Multiple" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -569,7 +583,7 @@ }, { "id": "a6e40f1041b06c996f7b2406", - "title": "Bonfire: Finders Keepers", + "title": "Finders Keepers", "difficulty": "2.12", "description": [ "Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument).", @@ -590,6 +604,7 @@ "MDNlinks": [ "Array.some()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -604,7 +619,7 @@ }, { "id": "a5deed1811a43193f9f1c841", - "title": "Bonfire: Drop it", + "title": "Drop it", "difficulty": "2.13", "description": [ "Drop the elements of an array (first argument), starting from the front, until the predicate (second argument) returns true.", @@ -627,6 +642,7 @@ "Arguments object", "Array.shift()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -641,7 +657,7 @@ }, { "id": "ab306dbdcc907c7ddfc30830", - "title": "Bonfire: Steamroller", + "title": "Steamroller", "difficulty": "2.14", "description": [ "Flatten a nested array. You must account for varying levels of nesting.", @@ -664,6 +680,7 @@ "MDNlinks": [ "Array.isArray()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -678,7 +695,7 @@ }, { "id": "a8d97bd4c764e91f9d2bda01", - "title": "Bonfire: Binary Agents", + "title": "Binary Agents", "difficulty": "2.15", "description": [ "Return an English translated sentence of the passed binary string.", @@ -700,6 +717,7 @@ "String.charCodeAt()", "String.fromCharCode()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -714,7 +732,7 @@ }, { "id": "a10d2431ad0c6a099a4b8b52", - "title": "Bonfire: Everything Be True", + "title": "Everything Be True", "difficulty": "2.21", "description": [ "Check if the predicate (second argument) returns truthy (defined) for all elements of a collection (first argument).", @@ -739,6 +757,7 @@ "Object.hasOwnProperty()", "Object.getOwnPropertyNames()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -753,7 +772,7 @@ }, { "id": "a97fd23d9b809dac9921074f", - "title": "Bonfire: Arguments Optional", + "title": "Arguments Optional", "difficulty": "2.22", "description": [ "Create a function that sums two arguments together. If only one argument is provided, return a function that expects one additional argument and will return the sum.", @@ -779,6 +798,7 @@ "Global Function Object", "Arguments object" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], diff --git a/challenges/intermediate-ziplines.json b/challenges/intermediate-ziplines.json index ff900aa54d..2a2d5af952 100644 --- a/challenges/intermediate-ziplines.json +++ b/challenges/intermediate-ziplines.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7158d8c442eddfaeb5bd18", - "title": "Zipline: Stylize Stories on Camper News", + "title": "Stylize Stories on Camper News", "difficulty": 1.02, "challengeSeed": ["126415129"], "description": [ @@ -22,6 +22,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

    Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -37,7 +38,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd19", - "title": "Zipline: Wikipedia Viewer", + "title": "Wikipedia Viewer", "difficulty": 1.03, "challengeSeed": ["126415131"], "description": [ @@ -54,6 +55,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

    Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -69,7 +71,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd17", - "title": "Zipline: Build a JavaScript Calculator", + "title": "Build a JavaScript Calculator", "difficulty": 1.05, "challengeSeed": ["126411565"], "description": [ @@ -85,6 +87,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

    Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -100,7 +103,7 @@ }, { "id": "bd7158d8c442eedfaeb5bd1c", - "title": "Zipline: Build a Tic Tac Toe Game", + "title": "Build a Tic Tac Toe Game", "difficulty": 1.06, "challengeSeed": ["126415123"], "description": [ @@ -117,6 +120,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

    Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", @@ -132,7 +136,7 @@ }, { "id": "bd7158d8c442eddfaeb5bd1c", - "title": "Zipline: Build a Simon Game", + "title": "Build a Simon Game", "difficulty": 1.07, "challengeSeed": ["126415123"], "description": [ @@ -155,6 +159,7 @@ "When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.", "If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.

    Click here then add your link to your tweet's text" ], + "type": "zipline", "challengeType": 3, "tests": [], "nameCn": "", diff --git a/challenges/jquery-ajax-and-json.json b/challenges/jquery-ajax-and-json.json index a5db78c6cb..fa3f8641a9 100644 --- a/challenges/jquery-ajax-and-json.json +++ b/challenges/jquery-ajax-and-json.json @@ -1,10 +1,10 @@ { - "name": "jQuery", + "name": "jQuery", "order": 0.004, "challenges": [ { "id": "bad87fee1348bd9acdd08826", - "title": "Waypoint: Learn how Script Tags and Document Ready Work", + "title": "Learn how Script Tags and Document Ready Work", "difficulty": 3.01, "description": [ "Now we're ready to learn jQuery, the most popular JavaScript tool of all time. Don't worry about JavaScript itself - we will cover it soon.", @@ -42,11 +42,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9bedc08826", - "title": "Waypoint: Target HTML Elements with Selectors Using jQuery", + "title": "Target HTML Elements with Selectors Using jQuery", "difficulty": 3.02, "description": [ "Now we have a \"document ready function\". We'll learn more about functions later. The important thing to know is that code you put inside this function will run as soon as your browser has loaded your page.", @@ -90,11 +91,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aedc08826", - "title": "Waypoint: Target Elements by Class Using jQuery", + "title": "Target Elements by Class Using jQuery", "difficulty": 3.03, "description": [ "You see how we made all of your button elements bounce? We selected them with $('button'), then we added some CSS classes to them with .addClass('animated bounce');.", @@ -139,11 +141,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aeda08826", - "title": "Waypoint: Target Elements by ID Using jQuery", + "title": "Target Elements by ID Using jQuery", "difficulty": 3.04, "description": [ "You can also target elements by their id attributes.", @@ -189,11 +192,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aeda08726", - "title": "Waypoint: Delete your jQuery Functions", + "title": "Delete your jQuery Functions", "difficulty": 3.05, "description": [ "These animations were cool at first, but now they're getting kind of distracting.", @@ -240,11 +244,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed908626", - "title": "Waypoint: Target the same element with multiple jQuery Selectors", + "title": "Target the same element with multiple jQuery Selectors", "difficulty": 3.06, "description": [ "Now you know three ways of targeting elements: by type $('button'), by class $('.btn')), and by id $('#target1')).", @@ -290,11 +295,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed918626", - "title": "Waypoint: Remove Classes from an element with jQuery", + "title": "Remove Classes from an element with jQuery", "difficulty": 3.07, "description": [ "In the same way you can add classes to an element with jQuery's addClass() function, you can remove them with jQuery's removeClass() function.", @@ -339,11 +345,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed908826", - "title": "Waypoint: Change the CSS of an Element Using jQuery", + "title": "Change the CSS of an Element Using jQuery", "difficulty": 3.08, "description": [ "We can also change the CSS of an HTML element directly with jQuery.", @@ -392,11 +399,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed808826", - "title": "Waypoint: Disable an Element Using jQuery", + "title": "Disable an Element Using jQuery", "difficulty": 3.09, "description": [ "You can also change the non-CSS properties of HTML elements with jQuery. For example, you can disable buttons.", @@ -442,11 +450,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed708826", - "title": "Waypoint: Remove an Element Using jQuery", + "title": "Remove an Element Using jQuery", "difficulty": 3.10, "description": [ "Now let's remove an HTML element from your page using jQuery.", @@ -489,11 +498,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed608826", - "title": "Waypoint: Use appendTo to Move Elements with jQuery", + "title": "Use appendTo to Move Elements with jQuery", "difficulty": 3.11, "description": [ "Now let's try moving elements from one div to another.", @@ -540,11 +550,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed508826", - "title": "Waypoint: Clone an Element Using jQuery", + "title": "Clone an Element Using jQuery", "difficulty": 3.12, "description": [ "In addition to moving elements, you can also copy them from one place to another.", @@ -593,11 +604,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed308826", - "title": "Waypoint: Target the Parent of an Element Using jQuery", + "title": "Target the Parent of an Element Using jQuery", "difficulty": 3.13, "description": [ "Every HTML elements has a \"parent\" element from which it \"inherits\" properties.", @@ -647,11 +659,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed208826", - "title": "Waypoint: Target the Children of an Element Using jQuery", + "title": "Target the Children of an Element Using jQuery", "difficulty": 3.14, "description": [ "Many HTML elements has a \"children\" element from which they \"inherits\" properties.", @@ -702,11 +715,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed108826", - "title": "Waypoint: Target a Specific Child of an Element Using jQuery", + "title": "Target a Specific Child of an Element Using jQuery", "difficulty": 3.15, "description": [ "You've seen why id attributes are so convenient for targeting with jQuery selectors. But you won't always have such neat ids to work with.", @@ -758,11 +772,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aed008826", - "title": "Waypoint: Target Even Numbered Elements Using jQuery", + "title": "Target Even Numbered Elements Using jQuery", "difficulty": 3.16, "description": [ "You can also target all the even-numbered elements.", @@ -816,11 +831,12 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 }, { "id": "bad87fee1348bd9aecb08826", - "title": "Waypoint: Use jQuery to Modify the Entire Page", + "title": "Use jQuery to Modify the Entire Page", "difficulty": 3.20, "description": [ "We're done playing with our jQuery playground. Let's tear it down!", @@ -872,6 +888,7 @@ " ", "" ], + "type": "waypoint", "challengeType": 0 } ] diff --git a/challenges/json-apis-and-ajax.json b/challenges/json-apis-and-ajax.json index cefd0f0e8c..8745e513de 100644 --- a/challenges/json-apis-and-ajax.json +++ b/challenges/json-apis-and-ajax.json @@ -1,5 +1,5 @@ { - "name": "JSON APIs and Ajax - Coming Soon", + "name": "JSON APIs and Ajax - Coming Soon", "order": 0.007, "challenges": [ ] diff --git a/challenges/mongodb.json b/challenges/mongodb.json index 75b24f29c7..1751c617d8 100644 --- a/challenges/mongodb.json +++ b/challenges/mongodb.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7243d8c341eddeaeb5bd0f", - "title": "Waypoint: Store Data in MongoDB", + "title": "Store Data in MongoDB", "difficulty": 0.01, "challengeSeed": ["133316035"], "description": [ @@ -33,6 +33,7 @@ "Complete \"Aggregate\"", "Once you've completed these steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", diff --git a/challenges/nodejs-and-expressjs.json b/challenges/nodejs-and-expressjs.json index 34d5401c86..ed6298910d 100644 --- a/challenges/nodejs-and-expressjs.json +++ b/challenges/nodejs-and-expressjs.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7153d8c441eddfaeb5bd0f", - "title": "Waypoint: Manage Packages with NPM", + "title": "Manage Packages with NPM", "difficulty": 0.39, "challengeSeed": ["126433450"], "description": [ @@ -42,6 +42,7 @@ "Complete \"Finale\"", "Once you've completed these steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -57,7 +58,7 @@ }, { "id": "bd7153d8c441eddfaeb5bdff", - "title": "Waypoint: Start a Node.js Server", + "title": "Start a Node.js Server", "difficulty": 0.40, "challengeSeed": ["126411561"], "description": [ @@ -83,6 +84,7 @@ "Complete \"HTTP Client\"", "Once you've completed these first 7 steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -98,7 +100,7 @@ }, { "id": "bd7153d8c441eddfaeb5bdfe", - "title": "Waypoint: Continue working with Node.js Servers", + "title": "Continue working with Node.js Servers", "difficulty": 0.41, "challengeSeed": ["128836506"], "description": [ @@ -111,6 +113,7 @@ "Complete \"Time Server\"", "Once you've completed these 3 steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -126,7 +129,7 @@ }, { "id": "bd7153d8c441eddfaeb5bdfd", - "title": "Waypoint: Finish working with Node.js Servers", + "title": "Finish working with Node.js Servers", "difficulty": 0.42, "challengeSeed": ["128836507"], "description": [ @@ -139,6 +142,7 @@ "Complete \"HTTP JSON API Server\"", "Once you've completed these final 3 steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -154,7 +158,7 @@ }, { "id": "bd7153d8c441eddfaeb5bd1f", - "title": "Waypoint: Build Web Apps with Express.js", + "title": "Build Web Apps with Express.js", "difficulty": 0.43, "challengeSeed": [ "126411559" @@ -181,6 +185,7 @@ "Complete \"JSON Me\"", "Once you've completed these steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index 90042d6c03..3faeed26e1 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -4,7 +4,7 @@ "challenges": [ { "id": "bd7153d8c44eeddfaeb5bd0f", - "title": "Waypoint: Learn Scope Chains and Closures", + "title": "Learn Scope Chains and Closures", "difficulty": 0.01, "challengeSeed": ["133316031"], "description": [ @@ -28,6 +28,7 @@ "Complete \"Garbage Collection\"", "Once you've completed these steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -43,7 +44,7 @@ }, { "id": "bd7153d8b44eeddfaeb5bd0f", - "title": "Waypoint: Use Prototypes for Inheriting Properties", + "title": "Use Prototypes for Inheriting Properties", "difficulty": 0.02, "challengeSeed": ["133316036"], "description": [ @@ -72,6 +73,7 @@ "Note that you can skip the last challenge.", "Once you've completed these steps, move on to our next challenge." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", @@ -87,7 +89,7 @@ }, { "id": "bd7129d8c441eddfbeb5bddf", - "title": "Waypoint: Practice Functional Programming", + "title": "Practice Functional Programming", "difficulty": 0.01, "challengeSeed": ["129169463"], "description": [ @@ -99,6 +101,7 @@ "This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.", "If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on." ], + "type": "waypoint", "challengeType": 2, "tests": [], "nameCn": "", From 150d531079c474d3c0f930976c03286e364e1f31 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sat, 8 Aug 2015 07:50:35 -0700 Subject: [PATCH 43/66] create name/dashName at seed --- index.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index fdbdf1f959..5c5c2bd38a 100644 --- a/index.js +++ b/index.js @@ -2,13 +2,12 @@ require('babel/register'); require('dotenv').load(); var fs = require('fs'), + _ = require('lodash'), path = require('path'), app = require('../server/server'), nonprofits = require('./nonprofits.json'), jobs = require('./jobs.json'); -var challangesRegex = /^(bonfire:|waypoint:|zipline:|basejump:|hike:)/i; - function getFilesFor(dir) { return fs.readdirSync(path.join(__dirname, '/' + dir)); } @@ -38,12 +37,15 @@ Challenge.destroyAll(function(err, info) { console.log('Deleted ', info); } challenges.forEach(function(file) { - var challenges = require('./challenges/' + file).challenges + var challengeSpec = require('./challenges/' + file); + var challenges = challengeSpec.challenges .map(function(challenge) { // NOTE(berks): add title for displaying in views - //challenge.title = challenge.name.replace(challangesRegex, '').trim(); - challenge.name = challenge.title.replace(/[^a-zA-Z0-9 ]/g, ''); // Remove non-alphanumwhitespace chars - challenge.dashedName = challenge.name.replace(/\s/g, '-'); // Replace with dasherize(); + challenge.name = + _.capitalize(challenge.type) + + ': ' + + challenge.title.replace(/[^a-zA-Z0-9\s]/g, ''); + challenge.dashedName = challenge.name.toLowerCase().replace(/\s/g, '-'); return challenge; }); From 5e9a9d07fbc553ac6443669df02dc5c935e9cb71 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Sat, 8 Aug 2015 17:11:11 +0100 Subject: [PATCH 44/66] Update to include OOP & functional programming course layout --- ...t-oriented-and-functional-programming.json | 200 +++++++++++++++++- 1 file changed, 198 insertions(+), 2 deletions(-) diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index d3a16ccfdf..dd00934296 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -1,6 +1,6 @@ { - "name": "Object Oriented and Functional Programming", - "order" : 0.010, + "name": "Object Oriented and Functional Programming - Under Construction From Challenge 4 Onwards", + "order" : 0.009, "challenges": [ { "id": "bd7153d8c44eeddfaeb5bd0f", @@ -114,6 +114,202 @@ "descriptionEs": [], "namePt": "", "descriptionPt": [] + }, + { + "id":"cf1111c1c14feddfaeb4bdef", + "name":"Creating Classes", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c13feddfaeb4bdef", + "name":"Static Properties", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c13feddfaeb5bdef", + "name":"Dynamic Properties", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c13feddfaeb6bdef", + "name":"Instantiation", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c13feddfaeb7bdef", + "name":"Closures", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c13feddfaeb8bdef", + "name":"Public Properties", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c13feddfaeb9bdef", + "name":"Inheritance", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb1bdef", + "name":"Prototypical Inheritance", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb2bdef", + "name":"Constructors", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb3bdef", + "name":"Factories", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb5bdef", + "name":"Pure Functions", + "Note":"May need a waypoint before each topic to announce what it is :p", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb6bdef", + "name":"Currying Functions", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb7bdef", + "name":"Composition", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb8bdef", + "name":"Functors", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 + }, + { + "id":"cf1111c1c14feddfaeb9bdef", + "name":"Currying Functions", + "dashedName":"#", + "difficulty":0, + "tests":[ + "assert(1==2, '');" + ], + "challengeSeed":[ + "Under Construction" + ], + "challengeType":0 } ] } From af5633bf6b97caf4b422e2ad9f4c0e7db7d4b297 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Sat, 8 Aug 2015 17:21:13 +0100 Subject: [PATCH 45/66] Removed new incomplete JS Challenges and moved to OOPF branch. --- ...t-oriented-and-functional-programming.json | 196 ------------------ 1 file changed, 196 deletions(-) diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index dd00934296..93c85cb4ee 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -114,202 +114,6 @@ "descriptionEs": [], "namePt": "", "descriptionPt": [] - }, - { - "id":"cf1111c1c14feddfaeb4bdef", - "name":"Creating Classes", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c13feddfaeb4bdef", - "name":"Static Properties", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c13feddfaeb5bdef", - "name":"Dynamic Properties", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c13feddfaeb6bdef", - "name":"Instantiation", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c13feddfaeb7bdef", - "name":"Closures", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c13feddfaeb8bdef", - "name":"Public Properties", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c13feddfaeb9bdef", - "name":"Inheritance", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb1bdef", - "name":"Prototypical Inheritance", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb2bdef", - "name":"Constructors", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb3bdef", - "name":"Factories", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb5bdef", - "name":"Pure Functions", - "Note":"May need a waypoint before each topic to announce what it is :p", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb6bdef", - "name":"Currying Functions", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb7bdef", - "name":"Composition", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb8bdef", - "name":"Functors", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 - }, - { - "id":"cf1111c1c14feddfaeb9bdef", - "name":"Currying Functions", - "dashedName":"#", - "difficulty":0, - "tests":[ - "assert(1==2, '');" - ], - "challengeSeed":[ - "Under Construction" - ], - "challengeType":0 } ] } From 26a616b2d08df54c5c3e7039ac301218dfd982d5 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sat, 8 Aug 2015 16:13:23 -0700 Subject: [PATCH 46/66] start onboarding page --- challenges/get-set-for-free-code-camp.json | 427 ------------------ ...t-oriented-and-functional-programming.json | 2 +- 2 files changed, 1 insertion(+), 428 deletions(-) delete mode 100644 challenges/get-set-for-free-code-camp.json diff --git a/challenges/get-set-for-free-code-camp.json b/challenges/get-set-for-free-code-camp.json deleted file mode 100644 index ae22da999b..0000000000 --- a/challenges/get-set-for-free-code-camp.json +++ /dev/null @@ -1,427 +0,0 @@ -{ - "name": "Get Set for Free Code Camp", - "order": 0.001, - "challenges": [ - { - "id": "bd7124d8c441eddfaeb5bdef", - "name": "Waypoint: Learn how Free Code Camp Works", - "dashedName": "waypoint-learn-how-free-code-camp-works", - "difficulty": 0.01, - "challengeSeed": ["125407438"], - "description": [ - "Watch this 1-minute video, or simply read this summary:", - "Welcome to Free Code Camp. We're an open source community of busy people who learn to code, then practice by building projects for nonprofits.", - "Learning to code is hard. It takes a lot of practice.", - "So we've focused on making Free Code Camp as convenient and accessible as possible.", - "Free Code Camp is self-paced, browser-based, and free.", - "During the first 800 hours of Free Code Camp, you'll learn technologies like HTML5, Node.js and databases.", - "During the last 800 hours, you'll build several real-life projects for nonprofits.", - "By the time you finish, you'll be a job-ready coder who has a portfolio of apps with happy users to prove it.", - "We'll even help you meet other coders in your city and find a coding job.", - "We'll provide you with the most rigorous curriculum and the most supportive community on earth. All you need to do sit down, day after day, and put in the hard work.", - "Now it's time to join our chat room. Click the \"I've completed this challenge\" button to move on to your next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Aprende sobre como funciona Free Code Camp", - "descriptionEs": [ - "Mira el video de 1 minuto o simplemente lee este resumen:", - "Bienvenido a Free Code Camp. Somos una comunidad de personas ocupadas tratando de aprender a programar construyendo proyectos para empresas sin fines de lucro.", - "Hemos construido esta comunidad porque aprender a programar es dificil; pero cualquiera que se pueda mantener motivado puede aprender a programar. Para mantenerte motivado, solo necesitas:
    1. hacerte amigo o amiga de personas que sepan programar
    2. programar un poco cada día
    ", - "Todos nuestros desafíos son
    1. gratuitos
    2. manejados a tu propio ritmo
    3. basados en tu navegador
    ", - "Estaremos trabajando
    1. 200 horas aprendiendo a utilizar herramientas como HTML, CSS, JavaScript, Node.js y bases de datos
    2. 600 horas construyendo proyectos prácticos
    3. 800 horas construyendo soluciones full stack para empresas sin fines de lucro
    ", - "Al finalizar
    1. seremos buenos en programación
    2. tendremos un portafolio con apps con usuarios contentos que puedan abogar por nuestro trabajo
    ", - "Una vez que completes el Free Code Camp, serás capaz de obtener un trabajo como desarrollador. Hay muchas posiciones de trabajo que están en búsqueda de programadores calificados.", - "Ahora es el momento de ingresar a nuestra sala de chat. Dale click al botón de \"I've completed this challenge\" para continuar con el siguiente desafío." - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Lerne wie Free Code Camp funktioniert", - "descriptionDe": [ - "Sieh dir das kurze Video an oder lies einfach diese Übersicht:", - "Willkommen im Free Code Camp. Wir sind eine Community aus eifrigen Personen, die Programmieren lernen, indem sie Projekte für gemeinnützige Organisationen umsetzen.", - "Programmieren zu lernen ist hart, weshalb wir diese Community ins Leben gerufen haben. Jeder, der motiviert bleiben kann, ist auch in der Lage Programmieren zu lernen. Und um motiviert zu bleiben, musst du nur:
    1. Freunde finden, die programmieren
    2. jeden Tag ein wenig programmieren
    ", - "All unsere Challenges sind
    1. kostenlos
    2. selbstbestimmt
    3. Browser-basiert
    ", - "Wir werden
    1. 200 Stunden mit Werkzeugen wie HTML, CSS, JavaScript, Node.js und Datenbanken arbeiten
    2. 600 Stunden Projekte umsetzen
    3. 800 Stunden komplette Lösungen für gemeinnützige Organisationen erstellen
    ", - "Am Ende werden wir
    1. gut im Programmieren sein
    2. ein Portfolio aus Anwendungen mit zufriedenen Nutzern vorweisen können
    ", - "Wenn du das Free Code Camp abgeschlossen hast, wirst du in der Lage sein einen Job in der Branche zu bekommen. Es gibt sehr viel mehr offene Stellen als fähige Programmierer, um sie zu besetzen.", - "Jetzt wird es Zeit unserem Chat beizutreten. Klicke auf \"I've completed this challenge\" um zur nächsten Challenge fortzufahren." - ] - }, - { - "id": "bd7125d8c441eddfaeb5bd0f", - "name": "Waypoint: Join Our Chat Room", - "dashedName": "waypoint-join-our-chat-room", - "difficulty": 0.02, - "challengeSeed": ["131574135"], - "description": [ - "Now we're going to join the Free Code Camp chat room. You can come here any time of day to hang out, ask questions, or find another camper to pair program with.", - "Create an account with GitHub here: https://github.com/join.", - "Click the pixel art in the upper right hand corner of GitHub, then choose settings. Upload a picture of yourself. A picture of your face works best. This is how people will see you in our chat rooms, so put your best foot forward. You can add your city and your personal website if you have one.", - "Go to Free Code Camp's open-source repository: https://github.com/freecodecamp/freecodecamp.", - "You can \"star\" this repository by clicking the star button in the upper right hand corner.", - "Later, you'll be able to fork this repository if you'd like to contribute to our open source codebase.", - "Join our main chat room: https://gitter.im/FreeCodeCamp/FreeCodeCamp.", - "Once you're in our chat room, introduce yourself by saying : \"Hello world!\".", - "Tell your fellow campers how you found Free Code Camp. Also tell us why you want to learn to code.", - "We have a busy chat room, so be sure to configure your notification settings in the top right corner.", - "Please note that all of our chat rooms are visible to the public, so if you need to share sensative information like an email address or phone number, do it in a private message.", - "Also Join our help chat room: https://gitter.im/FreeCodeCamp/help, where you can get help with our challenges in real time.", - "Keep our chat room open while you work through our other challenges. That way, you ask for help if you get stuck on a challenge. You can also socialize when you feel like taking a break.", - "You can also download a desktop or mobile chat application here: https://gitter.im/apps", - "You can also access this chat room by clicking the \"Chat\" button in the upper right hand corner.", - "In order to keep our community a friendly and positive place to learn to code, please read and follow our Code of Conduct: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct", - "Now you're ready to move on. Click the \"I've completed this challenge\" button to move on to your next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Únete a Nuestra Sala de Chat", - "descriptionEs": [ - "Ahora vamos a unirnos a la sala de chat de Free Code Camp. Puedes ingresar en cualquier momento para pasar el rato, hacer preguntas o para encontrar algún otro camper para programar en pares.", - "Asegurate de que tu cuenta de Free Code Camp incluya tu dirección de correo electrónico. Vale recalcar que si bien tu dirección de correo electrónico será invisible para el público, Slack lo hará visible para otros campers en las salas de chat. Puedes ingresar por aquí: http://freecodecamp.com/account.", - "Dale click a este link, el cual te enviará una invitación a las salas de chat de Free Code Camp: http://freecodecamp.com/api/slack.", - "Ahora revisa tu buzón de correo y dale click al link del correo electrónico que has recibido de Slack.", - "Completa el proceso de registro, actualiza tu información biográfica y sube una imagen. Una foto de tu cara funciona mejor. Esta es la manera como las personas te verán en las salas de chat, asegurate de mostrar tu mejor sonrisa.", - "Ahora ingresa al chat #General (Inglés) o #Espanol (Español) e introdúcete escribiendo: \"Hola mundo!\".", - "Comentale a otros campers como es que encontraste Free Code Camp. También hablanos sobre las razones por las cuales decidiste aprender a programar.", - "Mantén la sala de chat abierta mientras estás trabajando otros desafíos. De esa manera podrás pedir ayuda en caso te quedes atascado en algún de ellos. También puedes socializar cuando sientas que necesitas un descanso.", - "Puedes acceder a la sala de chat dándole click al botón de \"Chat\" en la parte superior derecha de la página.", - "Para mantener a nuestra comunidad como un lugar de aprendizaje positivo y amigable, por favor lee y sigue nuestro Código de Conducta: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct" - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Trete unserem Chat-Raum bei", - "descriptionDe": [ - "Nun werden wir dem Chat-Raum von Free Code Camp beitreten. Du kannst jederzeit vorbei kommen um abzuhängen, Fragen zu stellen oder andere Camper für Paarprogrammierung zu finden.", - "Stelle sicher, dass deine Email Adresse in deinem Free Code Camp Account hinterlegt ist. Bitte beachte, dass deine Email Adresse für die Öffentlichkeit nicht einsehbar ist, aber für andere Camper in Slack wird sie sichtbar sein. Du kannst sie hier eintragen: http://freecodecamp.com/account.", - "Klicke auf diesen Link, um von Slack eine Einladung zu den Chat-Räumen von Free Code Camp zu erhalten: http://freecodecamp.com/api/slack.", - "Kontrolliere jetzt dein Email Postfach und klicke in der Email von Slack auf den Link.", - "Beende die Registrierung und vervollständige dein Profil. Vergiss nicht, dein Profil-Bild hochzuladen. Ein Bild von deinem Gesicht ist am besten. So werden dich andere Personen im Chat sehen, also zeige dich von deiner Schokoladenseite.", - "Jetzt betrete den General Chat-Raum und stelle dich den anderen vor, indem du folgendes schreibst: \"Hello world!\".", - "Teile den anderen Campern mit, wie du auf Free Code Camp gestoßen bist. Wir interessieren uns auch dafür, warum du Programmieren lernen willst – aber auf englisch bitte, sonst versteht dich kaum einer.", - "Behalte den Chat geöffnet, während du an den Challenges arbeitest. Auf diesem Weg kannst du schnell nach Hilfe fragen, wenn du nicht weiter kommst. Du kannst auch jederzeit mit uns chatten, wenn du eine Pause einlegen möchtest.", - "Du kannst den Chat auch über die Schaltfläche \"Chat\" oben rechts auf dieser Seite erreichen.", - "Damit diese Community ein freundlicher und positiver Ort zum Lernen bleibt, lies und folge bitte unseren Verhaltensregeln: https://github.com/FreeCodeCamp/freecodecamp/wiki/Code-of-Conduct" - ] - }, - { - "id": "bd7125d8c441eddfaeb5bdff", - "name": "Waypoint: Preview our Challenge Map", - "dashedName": "waypoint-preview-our-challenge-map", - "difficulty": 0.03, - "challengeSeed": ["125407437"], - "description": [ - "Before you start learning how to code, we'd like to introduce you to a few things.", - "Let's look at our Challenge Map. Click on the \"Map\" button in the upper right hand corner. This map shows all the challenges that will teach you how to code.", - "You should complete all of these challenges in order.", - "In addition to our Waypoint challenges, like the one you're doing now, we have algorithm practice challenges (Bonfires), front end development challenges (Ziplines) and full stack development challenges (Basejumps). After you finish all of these, you'll start building projects for nonprofits.", - "Please note that our open-source curriculum is a work in progress. Our volunteer community is constantly improving it. If you think you've encountered a bug, typo, or something that seems confusing, be sure to click the \"bug\" button to create a GitHub issue." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Revisa nuestro Mapa de Desafíos", - "descriptionEs": [ - "Antes de comenzar a aprender a programar, nos gustaría mostrarte algunas cosas.", - "Revisemos el Mapa de Desafíos. Dale click al botón de \"Map\" en la parte superior derecha. Este mapa muestra todos los desafíos que te enseñarán a programar.", - "Deberías completar todos estos desafíos en orden.", - "Una vez que termines con los Waypoints, seguiremos con los Bonfires (práctica de algoritmos), luego Ziplines (práctica de desarrollo front end) y para terminar los Basejumps (práctica de desarrollo full stack). Después de eso, empezarás a desarrollar proyectos para empresas sin fines de lúcro.", - "El mapa de desafíos es solamente de referencia. Puedes también presionar el botón de \"Learn\", el cual te llevará directamente al siguiente desafío.", - "Para terminar, ten en cuenta que nuestra currícula open-source es un trabajo en progreso. Nuestra comunidad de voluntarios está mejorandola constantemente. Si crees que te has topado con algún bug, error ortográfico o algo que parezca confuso, haznos el favor de abrir un ticket a través de Github: https://github.com/FreeCodeCamp/freecodecamp/issues." - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Besuche die Challenge Map", - "descriptionDe": [ - "Bevor du startest, wollen wir dir ein paar Dinge zeigen.", - "Betrachte die Challenge Map. Klicke auf \"Map\" oben rechts auf dieser Seite. Diese Übersicht zeigt dir alle Challenges.", - "Du solltest alle Challenges in der gezeigten Reihenfolge abschließen.", - "Hast du alle Waypoint-Challenges beendet, folgen die Bonfires (Algorithmen), darauf Ziplines (Frontend Development) und zum Schluss Basejumps (Full Stack Development). Danach wirst du anfangen, Projekte für gemeinnützige Organisationen umzusetzen.", - "Diese Challenge Map dient dir als Orientierung. Du kannst einfach auf \"Learn\" klicken und direkt zur nächsten Challenge fortfahren.", - "Bitte beachte, dass unser Open Source Lehrplan nicht fertig ist. Unsere freiwillige Community verbessert diesen stetig. Wenn du einen Bug, Rechtschreib-Fehler oder etwas gefunden hast, das dir komisch vorkommt, öffne bitte ein GitHub Issue: https://github.com/FreeCodeCamp/freecodecamp/issues. Wie gehabt bitte in englischer Sprache." - ] - }, - { - "id": "bd7125d8c441eddfaeb5bd1f", - "name": "Waypoint: Browse our Wiki", - "dashedName": "waypoint-browse-our-wiki", - "difficulty": 0.04, - "challengeSeed": ["125407435"], - "description": [ - "Free Code Camp has an up-to-date wiki that will answer your many questions.", - "Click the \"Wiki\" button in the upper right hand corner.", - "You can browse our wiki at your convenience. Most of its articles take less than 1 minute to read.", - "All of our Wiki articles are contributed by our community. You can update our wiki articles, and even create wiki articles of your own.", - "Now you can move on to your next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Revisa nuestro Field Guide", - "descriptionEs": [ - "Free Code Camp tiene un field guide actualizado que respondera tus preguntas.", - "Dale click al botón \"Field Guide\" en la parte superior derecha.", - "Puedes navegar el Field Guide cuando veas conveniente. La mayoría de los artículos los puedes leer en menos de 1 minuto .", - "Cuando le des click al botón de Field Guide, siempre te regresará al último artículo que estuviste leyendo.", - "Lee algunos de nuestros artículos, luego continúa con tu siguiente desafío." - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Stöbere in unserem Field Guide", - "descriptionDe": [ - "Free Code Camp hat einen aktuellen Field Guide, welcher viele deiner Fragen beantworten wird.", - "Klicke oben rechts auf \"Field Guide\".", - "Du kannst im Field Guide nach Lust und Laune stöbern. Die meisten der Artikel sind in weniger als einer Minute gelesen.", - "Wenn du auf den besagten Field Guide in der Navigation klickst, wirst du direkt zu dem Artikel geleitet, den du als letztes gelesen hast.", - "Lies ein paar der Artikel, dann schreite zu deiner nächsten Challenge voran." - ] - }, - { - "id": "bd7125d8c441eddfaeb5bd2f", - "name": "Waypoint: Customize your Portfolio Page", - "dashedName": "waypoint-customize-your-portfolio-page", - "difficulty": 0.05, - "challengeSeed": ["125407433"], - "description": [ - "You and all your fellow campers have portfolio pages.", - "Click your picture in the upper right hand corner to go to your account page.", - "Before you can see your portfolio page, you'll need to link your GitHub account with Free Code Camp.", - "You can also fill out a short biography, and add links to your social media profiles.", - "Your portfolio page shows how many Brownie Points you have. You can get Brownie Points by completing challenges and by helping other campers in our chat rooms.", - "Your portfolio page also shows off your progress through Free Code Camp. If you get Brownie Points on several days in a row, you'll get streak.", - "Once you're happy with your portfolio page, you can move on to your next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Personaliza tu página de Portafolio", - "descriptionEs": [ - "Tú y tus otros amigos campers tienen sus propias páginas de portafolio.", - "Para visualizar tu página de portafolio, dale click a tu foto en la parte superior derecha.", - "Tu página de portafolio mostrará automaticamente tu progreso en Free Code Camp", - "Dale click al botón de \"Update my portfolio page or manage my account\"", - "Puedes enlazarte con tus cuentas de Github, Twitter y LinkedIn. Si ya has creado alguna página web, puedes enlazarla aquí también.", - "Asegurate de darle click al botón de \"Update my Bio\" o \"Update my Social Links\" para agregar esta nueva información a tu portafolio.", - "Una vez que estés satisfecho con tu página de portafolio, puedes seguir con el siguiente desafío." - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Personalisiere deine Portfolio-Seite", - "descriptionDe": [ - "Du und die anderen Camper habt Portfolio-Seiten.", - "Um zu deinem Portfolio zu gelangen, klicke oben rechts auf dein Bild.", - "Dein Portfolio wird deinen Fortschritt im Free Code Camp automatisch anzeigen.", - "Klicke auf \"Update my portfolio page or manage my account\"", - "Du kannst deine GitHub, Twitter und LinkedIn Accounts verlinken. Wenn du bereits ein paar Websites gebaut hast, kannst du sie ebenfalls präsentieren.", - "Stelle sicher, dass du auf \"Update my Bio\" oder \"Update my Social Links\" klickst, um diese neuen Informationen zu speichern.", - "Sobald du zufrieden mit deinem Portfolio bist, kannst du zur nächsten Challenge fortfahren." - ] - }, - { - "id": "bd7126d8c441eddfaeb5bd3f", - "name": "Waypoint: Try Camper News", - "dashedName": "waypoint-try-camper-news", - "difficulty": 0.06, - "challengeSeed": ["124553410"], - "description": [ - "Camper News is the best place for our campers to share and discuss helpful links.", - "Click \"News\" in the upper right hand corner.", - "You'll see a variety of links that have been submitted. Their rank is determined by how recently they were submitted and how many upvotes they have.", - "If you enjoy a link, you should upvote it.", - "You can also submit links that you think will be interesting to other campers.", - "You can view the portfolio pages of any camper who has posted links on Camper News. Just click on their photo.", - "When you submit a link, you'll get a Brownie Point. You'll also get a Brownie Point each time someone upvotes your link.", - "Now that you've learned how to use Camper News, let's move on to your next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Prueba las Noticias de Campers", - "descriptionEs": [ - "Noticias de Campers es el mejor lugar para que nuestros campers puedan discutir y compartir links útiles.", - "Dale click a \"News\" en la parte superior derecha.", - "Verás una gran variedad de links que han sido enviados. Dale click al botón de \"Discuss\" debajo de uno de ellos.", - "Puedes votar por links que te gusten. Esto hará que el ranking de tu link suba.", - "Puedes también dejar un comentario a un link. Si alguien responde a tu comentario recibirás un correo electrónico de notificación para que puedas regresar y responderlo.", - "También puedes enviar tus propios links. Puedes escoger el título del link, asi como también dejar un comentario inicial sobre él.", - "Puedes ver las páginas de portafolio de cualquier camper que ha enviado links o comentarios en las Noticias de Campers. Solo tienes que darle click a su fotografía.", - "Cuando envies un link, recibirás un punto. También obtendrás un punto cada vez que otra persona vote por tu link.", - "Ahora que has aprendido a utilizar las Noticias de Campers, continuaremos con el siguiente desafío." - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Verpasse nicht die Camper News", - "descriptionDe": [ - "Camper News ist der beste Ort für unsere Camper, nützliche Links zu teilen und zu diskutieren.", - "Klicke oben rechts auf \"News\".", - "Du wirst eine Vielzahl an Links sehen, die bereits geteilt wurden. Klicke auf \"Discuss\" unter einem von ihnen.", - "Du kannst Links bewerten. Das wird den Link in der Platzierung weiter nach oben befördern.", - "Du kannst einen Link auch kommentieren. Wenn jemand auf deinen Kommentar antwortet, wirst du per Email benachrichtigt, sodass du zurück kommen und reagieren kannst.", - "Du kannst ebenfalls Links teilen. Bearbeite den Titel des Links und hinterlasse einen ersten Kommentar, um die Diskussion zu starten.", - "Du kannst dir das Portfolio jedes Campers anschauen, der einen Link geteilt hat. Klicke dazu einfach auf ihr Bild.", - "Sobald du einen Link teilst, erhältst du einen Punkt. Jedes Mal, wenn jemand deinen Link bewertet, erhältst du zusätzlich einen Punkt.", - "Jetzt da du gelernt hast, was Camper News ist, kanns du zur nächsten Challenge gehen." - ] - }, - { - "id": "bd7126d8c441eddfaeb5bd3e", - "name": "Waypoint: Meet Other Campers in your City", - "dashedName": "waypoint-meet-other-campers-in-your-city", - "difficulty": 0.07, - "challengeSeed": ["127358841"], - "description": [ - "One of the best ways to stay motivated when learning to code is to hang out with other campers in-person.", - "The easiest way to meet other campers in your city is to join your city's Campsite. Each of these has its own Facebook group and Gitter chat room. Click here to view our growing list of Campsites. ", - "Click the link to your city's Facebook group. Then, once Facebook loads, click \"Join group\".", - "If you don't see your city on this list, you should follow these directions to create a Facebook group for your city.", - "If you don't have a Facebook account, we strongly recommend you create one, even if it's just for the purpose of coordinating with campers in your city through your Campsite.", - "Our Campsites allow you to create events, coordinate those events, and share photos from the events afterward.", - "Whether you're hosting a study group, pair programming at your local library, or going to a weekend hackathon, your city's Campsite will help you make it happen." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Encuentrate con otros Campers en tu Ciudad", - "descriptionEs": [ - "Una de las mejores maneras de mantenerte motivado cuando estás aprendiendo a programar es pasar el rato con otros campers.", - "Gitter y Noticias de Campers son una muy buena forma de comunicarte con otros campers, pero no hay ningún substituto para conocerlos en persona.", - "La forma más fácil de encontrarte con otros campers en tu ciudad es unirte al grupo de Facebook de tu ciudad o país. Dale click a here para ver la lista de grupos locales.", - "Dale click al link de tu ciudad o país y una vez que Facebook cargue, dale click a \"Join group\".", - "Nuestros grupos locales son pocos, asi que en caso no veas tu ciudad o país en la lista, solamente sigue las instrucciones para crear un grupo de Facebook para ello.", - "Si no tienes una cuenta de Facebook, te recomendamos que crees una, asi sea solamente con el proposito de coordinar con otros campers en tu ciudad a través del grupo", - "Nuestros grupos te dan la potestad de crear eventos y coordinarlos, solamente asegurate de compartir las fotos del evento una vez terminado.", - "En caso seas el anfitrión de un grupo de estudio, estes programando en pares en una biblioteca local o piensen en ir a un hackathon de fin de semana, tu grupo local te ayudará a hacerlo." - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Treffe andere Camper in deiner Stadt", - "descriptionDe": [ - "Der beste Weg, motiviert am Ball zu bleiben, ist mit anderen Campern abzuhängen.", - "Slack und Camper News sind super Wege zur Kommunikation mit anderen Campern. Es gibt aber nichts vergleichbares, Personen im echten Leben zu treffen.", - "Um leicht andere Camper in deiner Stadt zu treffen, solltest du der Facebook Gruppe deiner Stadt beitreten. Klicke hier um unsere wachsende Liste der lokalen Gruppen zu sehen.", - "Klicke auf den Link zu deiner Stadt. Sobald Facebook geladen ist, klicke auf \"Gruppe beitreten\".", - "Unsere lokalen Gruppen sind neu. Solltest du deine Stadt also nicht in der Liste sehen, erstelle doch bitte eine Facebook Gruppe deiner Stadt indem du den Anweisungen dazu folgst.", - "Wenn du keinen Facebook Account hast, empfehlen wir dir einen zu erstellen. Auch wenn dieser nur dazu dient, sich mit anderen Campern in deiner Stadt zu koordinieren.", - "Unsere Gruppen erlauben dir, Events zu planen und Fotos davon zu teilen.", - "Egal ob du eine Studenten-Gruppe, Paarprogrammierung an deiner lokalen Bibliothek oder einen Hackathon am Wochenende anbieten willst. Die Gruppe deiner Stadt macht das alles möglich." - ] - }, - { - "id": "bd7126d8c431eddfaeb5bd3e", - "name": "Waypoint: Add Free Code Camp to your LinkedIn Profile", - "dashedName": "waypoint-add-free-code-camp-to-your-linkedin-profile", - "difficulty": 0.08, - "challengeSeed": ["131574134"], - "description": [ - "LinkedIn is a critical tool for your job search later on.", - "Add Free Code Camp to your LinkedIn profile by going to https://www.linkedin.com/profile/edit-education?school=Free+Code+Camp.", - "Estimate your dates. Keep in mind that Free Code Camp is a rigorous 1,600 hour program, and will probably take at least a year to complete.", - "In the \"Degree\" section, type \"Full Stack Web Development\".", - "In the \"Field of study\" section, type \"Computer Software Engineering\".", - "Click the \"Save Changes\" button.", - "Be sure to add your key word skills to LinkedIn's skills section as you learn them, such as HTML, jQuery, Linux and Node.js.", - "You can expand your LinkedIn network by inviting friends you meet through Free Code Camp to connect with you on LinkedIn.", - "Make your LinkedIn profile as complete as possible. Unlike other social networks, with LinkedIn, it's perfectly fine if you don't want to add a photo.", - "Let's keep moving. We're almost ready to start coding!" - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "bd7137d8c441eddfaeb5bdef", - "name": "Waypoint: Get Help the Hacker Way with RSAP", - "dashedName": "waypoint-get-help-the-hacker-way-with-rsap", - "difficulty": 0.09, - "challengeSeed": ["125407432"], - "description": [ - "Let's cover one last thing before you start working through our lessons: how to get help.", - "Any time you get stuck or don't know what to do next, follow this simple algorithm (procedure): RSAP (Read, Search, Ask, Post).", - "First, R - Read the documentation or error message. A key skill that good coders have is the ability to interpret and then follow instructions.", - "Next, S - Search Google. Good Google queries take a lot of practice. When you search Google, you usually want to include the language or framework you're using. You also want to limit the results to a recent period.", - "Then, if you still haven't found an answer to your question, A - Ask your friends. If you have trouble, you can ask your fellow campers. We have a special chat room specifically for getting help with tools you learn through these Free Code Camp Challenges. Go to https://gitter.im/FreeCodeCamp/Help. Keep this chat open while you work on the remaining challenges.", - "Finally, P - Post on Stack Overflow. Before you attempt to do this, read Stack Overflow's guide to asking good questions: http://stackoverflow.com/help/how-to-ask.", - "Here's our detailed wiki article on getting help: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck.", - "Now you have a clear algorithm to follow when you need help! Let's start coding! Move on to your next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "Waypoint: Obtén ayuda del modo Hacker con RSAP", - "descriptionEs": [ - "Cubramos un último punto antes que empieces a trabajar en los cursos: como obtener ayuda.", - "Cualquier momento en el que te atasques o no sepas que hacer, sigue este simple algoritmo (procedimiento): RSAP (Read, Search, Ask, Post). Que en español vendría a ser Lee, Busca, Pregunta, Publica.", - "Primero, Lee - Lee la documentación o el mensaje de error. El punto fuerte de un buen programador es la habilidad de interpretar y seguir instrucciones.", - "Luego, Busca - Busca en Google. Buenas búsquedas o queries requieren bastante práctica. Cuando búsques en Google, idealmente tienes que incluir el lenguaje o framework que estés usando. También tendrás que limitar los resultados de búsqueda a un periodo reciente.", - "Ahora, en caso no hayas encontrado la respuesta a tu pregunta, Pregunta - Pregunta a tus amigos. En caso estes en problemas, puedes preguntar a otros campers. Tenemos una sala de chat especificamente para obtener ayuda sobre las herramientas que utilizamos en los desafíos de Free Code Camp. Ingresa a https://gitter.im/FreeCodeCamp/Help. Mantén este chat abierto mientras trabajas en los desafíos subsiguientes.", - "Finalmente, Publica - Publica tu pregunta en Stack Overflow. Antes de hacer esto lee la guía de Stack Overflow para publicar buenas preguntas: http://stackoverflow.com/help/how-to-ask. Tendrás que hacerlo en inglés, en caso no sepas como, pide que te ayuden a traducir tu pregunta en el canal #espanol de Slack.", - "Aquí está nuestra guia detallada en como obtener ayuda: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck.", - "Ahora que tienes en claro el procedimiento a seguir cuando necesites ayuda. ¡Empecémos a programar! Continua con el siguiente desafío." - ], - "namePt": "", - "descriptionPt": [], - "nameDe": "Waypoint: Der Weg des Hackers – Hilfe erhalten mit RSAP", - "descriptionDe": [ - "Lass uns eine letzte Sache behandeln, bevor du mit den Lektionen beginnst: Wie du Hilfe bekommst.", - "Immer wenn du nicht weiter kommst oder du nicht weißt, was als nächstes zu Tun ist, kannst du diesem einfachen Algorithmus (Prozedur) folgen: RSAP (Read, Search, Ask, Post – Lesen, Suchen, Fragen, Posten).", - "Erstens, R – Lies die Dokumentation oder die Fehler-Meldung. Eine wichtige Eigenschaft aller Coder ist es, Anweisungen zu interpretieren und zu folgen.", - "Danach, S – Suche bei Google. Es bedarf viel Übung, gute Such-Anfragen zu stellen. Wenn du bei Google suchst, solltest du die Sprache oder das Framework angeben, welches du benutzt. Außerdem wirst du die aktuellsten Ergebnisse haben wollen.", - "Wenn du keine Antwort auf deine Frage erhalten hast, folge A – Frage deine Freunde. Wenn du Probleme hast, kannst du andere Camper fragen. Wir haben einen speziellen Chat-Raum zur Unterstützung beim Lernen eingerichtet. Gehe zu https://freecode.slack.com/messages/help/. Behalte diesen Chat offen, solange du an den Challenges arbeitest.", - "Und zum Schluss, P – Poste auf Stack Overflow. Bevor du das tust, lies bitte den Leitfaden für gute Fragen auf Stack Overflow: http://stackoverflow.com/help/how-to-ask.", - "Hier ist unser detaillierter Field Guide um Hilfe zu erhalten: http://freecodecamp.com//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck.", - "Jetzt hast du einen klaren Algorithmus, dem du folgen kannst wenn du Hilfe benötigst. Fangen wir an zu programmieren! Gehe zur nächsten Challenge." - ] - } - ] -} diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index 93c85cb4ee..6ef66c0c9b 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -1,5 +1,5 @@ { - "name": "Object Oriented and Functional Programming - Under Construction From Challenge 4 Onwards", + "name": "Object Oriented and Functional Programming", "order" : 0.009, "challenges": [ { From e262b5d6bfeddd62300733924cc2005a9f3c5783 Mon Sep 17 00:00:00 2001 From: ahstro Date: Sun, 9 Aug 2015 02:08:42 +0200 Subject: [PATCH 47/66] Disregard order in 'Symmetric Difference' #1402 --- challenges/expert-bonfires.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenges/expert-bonfires.json b/challenges/expert-bonfires.json index 50bbe89de2..bb0294b27f 100644 --- a/challenges/expert-bonfires.json +++ b/challenges/expert-bonfires.json @@ -81,9 +81,9 @@ "sym([1, 2, 3], [5, 2, 1, 4]);" ], "tests": [ - "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);", - "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');", - "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');", + "assert.deepEqual(sym([1, 2, 3], [5, 2, 1, 4]).sort(), [3, 4, 5], 'should return the symmetric difference of the given arrays');", + "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).sort(), [1, 4, 5], 'should return the symmetric difference of the given arrays');", + "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).sort(), [1, 4, 5], 'should return an array of unique values');", "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');" ], "MDNlinks": [ From d3bbed92ede0fb10a2922f561aff8ea188c8ccd3 Mon Sep 17 00:00:00 2001 From: alanmbarr Date: Sat, 8 Aug 2015 21:59:03 -0700 Subject: [PATCH 48/66] Update bootstrap.json --- challenges/bootstrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index 800f64d113..d839ef1c06 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -1435,7 +1435,7 @@ "tests": [ "assert($('div.row:has(input[type=\\'text\\'])').length > 0 && $('div.row:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button and text area in a div with class \"row\".')", "assert($('div.col-xs-5:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button in a div with the class \"col-xs-5\".')", - "assert($('div.col-xs-7:has(input[type=\\'text\\'])').length > 0, 'Nest your form text area in a div with the class \"col-xs-7\".')", + "assert($('div.col-xs-7:has(input[type=\\'text\\'])').length > 0, 'Nest your form text input in a div with the class \"col-xs-7\".')", "assert(editor.match(/<\\/div>/g) && editor.match(/
    /g).length === editor.match(/
    div elements has a closing tag.')" ], "challengeSeed": [ From 8a003d1c6ab9896b539241226453e8f1171451dc Mon Sep 17 00:00:00 2001 From: alanmbarr Date: Sat, 8 Aug 2015 22:10:07 -0700 Subject: [PATCH 49/66] other typo text input instead of area for clarity --- challenges/bootstrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/bootstrap.json b/challenges/bootstrap.json index d839ef1c06..985a1fa77b 100644 --- a/challenges/bootstrap.json +++ b/challenges/bootstrap.json @@ -1433,7 +1433,7 @@ "This is the last challenge we'll do for our Cat Photo App for now. We hope you've enjoyed learning Font Awesome, Bootstrap, and responsive design!" ], "tests": [ - "assert($('div.row:has(input[type=\\'text\\'])').length > 0 && $('div.row:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button and text area in a div with class \"row\".')", + "assert($('div.row:has(input[type=\\'text\\'])').length > 0 && $('div.row:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button and text input in a div with class \"row\".')", "assert($('div.col-xs-5:has(button[type=\\'submit\\'])').length > 0, 'Nest your form submission button in a div with the class \"col-xs-5\".')", "assert($('div.col-xs-7:has(input[type=\\'text\\'])').length > 0, 'Nest your form text input in a div with the class \"col-xs-7\".')", "assert(editor.match(/<\\/div>/g) && editor.match(/
    /g).length === editor.match(/
    div elements has a closing tag.')" From 22c416c7dbd88887929267928a924fca168ce2c1 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sun, 9 Aug 2015 07:40:16 -0700 Subject: [PATCH 50/66] add challenge order to individual challenge --- index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5c5c2bd38a..b2a4e3e84c 100644 --- a/index.js +++ b/index.js @@ -38,14 +38,19 @@ Challenge.destroyAll(function(err, info) { } challenges.forEach(function(file) { var challengeSpec = require('./challenges/' + file); + var order = challengeSpec.order; var challenges = challengeSpec.challenges - .map(function(challenge) { + .map(function(challenge, index) { // NOTE(berks): add title for displaying in views challenge.name = _.capitalize(challenge.type) + ': ' + challenge.title.replace(/[^a-zA-Z0-9\s]/g, ''); - challenge.dashedName = challenge.name.toLowerCase().replace(/\s/g, '-'); + challenge.dashedName = challenge.name + .toLowerCase() + .replace(/\:/g, '') + .replace(/\s/g, '-'); + challenge.order = +('' + order + (index + 1)); return challenge; }); From 1fba648672ab2f00d73a9c13e1c4c8e87244a495 Mon Sep 17 00:00:00 2001 From: ahstro Date: Mon, 10 Aug 2015 14:42:02 +0200 Subject: [PATCH 51/66] Refactored CompletionMonitor() slightly --- challenge-migration.js | 14 -------------- index.js | 21 +++++++++++---------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/challenge-migration.js b/challenge-migration.js index 5c8fd01590..7ef359781f 100644 --- a/challenge-migration.js +++ b/challenge-migration.js @@ -8,20 +8,6 @@ var bonfires = require('./bonfires.json'), oldUri='mongodb://localhost:27017/app30893198', coursewares = require('./coursewares.json'); -var counter = 0; -var offerings = 2; - -var CompletionMonitor = function() { - counter++; - console.log('call ' + counter); - - if (counter < offerings) { - return; - } else { - process.exit(0); - } -}; - MongoClient.connect(oldUri, function(err, database) { database.collection('users').find({}).batchSize(20).toArray(function(err, users) { diff --git a/index.js b/index.js index 3dbbf9d869..8c46b77f68 100644 --- a/index.js +++ b/index.js @@ -17,18 +17,19 @@ var Nonprofit = app.models.Nonprofit; var Job = app.models.Job; var counter = 0; var challenges = getFilesFor('challenges'); -var offerings = 2 + challenges.length; -var CompletionMonitor = function() { +function completionMonitor() { + // Increment counter counter++; - console.log('call ' + counter); - if (counter < offerings) { - return; - } else { + // Exit if all challenges have been checked + if (counter > challenges.length) { process.exit(0); } -}; + + // Log where in the seed order we're currently at + console.log('Call: ' + counter + "/" + challenges.length); +} Challenge.destroyAll(function(err, info) { if (err) { @@ -66,7 +67,7 @@ Challenge.destroyAll(function(err, info) { console.log(err); } else { console.log('Successfully parsed %s', file); - CompletionMonitor(); + completionMonitor(); } } ); @@ -85,7 +86,7 @@ Nonprofit.destroyAll(function(err, info) { } else { console.log('Saved ', data); } - CompletionMonitor(); + completionMonitor(); console.log('nonprofits'); }); }); @@ -103,6 +104,6 @@ Job.destroyAll(function(err, info) { console.log('Saved ', data); } console.log('jobs'); - CompletionMonitor(); + completionMonitor(); }); }); From ce6f0b4a618cfa528bd3dd687974cdab324175d5 Mon Sep 17 00:00:00 2001 From: ahstro Date: Mon, 10 Aug 2015 20:08:14 +0200 Subject: [PATCH 52/66] Incorrect JSON caused error during seed --- challenges/advanced-bonfires.json | 12 ++++++------ challenges/upper-intermediate-bonfires.json | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index 32e684830c..6d67184b71 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -65,14 +65,14 @@ }, { "id": "a3f503de51cf954ede28891d", - "name": "Bonfire: Symmetric Difference", - "dashedName": "bonfire-symmetric-difference", + "title": "Symmetric Difference", "difficulty": "4.02", "description": [ "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], + "type": "bonfire", "challengeSeed": [ "function sym(args) {", " return arguments;", @@ -104,8 +104,7 @@ }, { "id": "aa2e6f85cab2ab736c9a9b24", - "name": "Bonfire: Exact Change", - "dashedName": "bonfire-exact-change", + "title": "Exact Change", "difficulty": "4.03", "description": [ "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", @@ -114,6 +113,7 @@ "Otherwise, return change in coin and bills, sorted in highest to lowest order.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], + "type": "bonfire", "challengeSeed": [ "function drawer(price, cash, cid) {", " var change;", @@ -160,13 +160,13 @@ }, { "id": "a56138aff60341a09ed6c480", - "name": "Bonfire: Inventory Update", - "dashedName": "bonfire-inventory-update", + "title": "Inventory Update", "difficulty": "4.04", "description": [ "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], + "type": "bonfire", "challengeSeed": [ "function inventory(arr1, arr2) {", " // All inventory must be accounted for or you're fired!", diff --git a/challenges/upper-intermediate-bonfires.json b/challenges/upper-intermediate-bonfires.json index bfd765facb..f99c278516 100644 --- a/challenges/upper-intermediate-bonfires.json +++ b/challenges/upper-intermediate-bonfires.json @@ -4,8 +4,7 @@ "challenges": [ { "id": "a2f1d72d9b908d0bd72bb9f6", - "name": "Bonfire: Make a Person", - "dashedName": "bonfire-make-a-person", + "title": "Make a Person", "difficulty": "3.01", "description": [ "Fill in the object constructor with the methods specified in the tests.", @@ -14,6 +13,7 @@ "These methods must be the only available means for interacting with the object.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], + "type": "bonfire", "challengeSeed": [ "var Person = function(firstAndLast) {", " return firstAndLast;", @@ -56,7 +56,7 @@ }, { "id": "af4afb223120f7348cdfc9fd", - "name": "Bonfire: Map the Debris", + "title": "Bonfire: Map the Debris", "dashedName": "bonfire-map-the-debris", "difficulty": "3.02", "description": [ @@ -97,8 +97,7 @@ }, { "id": "a3f503de51cfab748ff001aa", - "name": "Bonfire: Pairwise", - "dashedName": "bonfire-pairwise", + "title": "Pairwise", "difficulty": "3.03", "description": [ "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", @@ -106,6 +105,7 @@ "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], + "type": "bonfire", "challengeSeed": [ "function pairwise(arr, arg) {", " return arg;", From 4fae8d59b3d7061788d82304b82b07d9185ab3e2 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 10 Aug 2015 11:27:12 -0700 Subject: [PATCH 53/66] fix mising type remove extra bonfire in title --- challenges/advanced-bonfires.json | 7 +++---- challenges/upper-intermediate-bonfires.json | 7 ++++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index 6d67184b71..97482403fa 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -5,7 +5,6 @@ { "id": "aff0395860f5d3034dc0bfc9", "title": "Validate US Telephone Numbers", - "type": "bonfire", "difficulty": "4.01", "description": [ "Return true if the passed string is a valid US phone number", @@ -51,6 +50,7 @@ "MDNlinks": [ "RegExp" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -72,7 +72,6 @@ "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], - "type": "bonfire", "challengeSeed": [ "function sym(args) {", " return arguments;", @@ -90,6 +89,7 @@ "Array.reduce()", "Symmetric Difference" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -113,7 +113,6 @@ "Otherwise, return change in coin and bills, sorted in highest to lowest order.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], - "type": "bonfire", "challengeSeed": [ "function drawer(price, cash, cid) {", " var change;", @@ -146,6 +145,7 @@ "MDNlinks": [ "Global Object" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -166,7 +166,6 @@ "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], - "type": "bonfire", "challengeSeed": [ "function inventory(arr1, arr2) {", " // All inventory must be accounted for or you're fired!", diff --git a/challenges/upper-intermediate-bonfires.json b/challenges/upper-intermediate-bonfires.json index f99c278516..104b0312e2 100644 --- a/challenges/upper-intermediate-bonfires.json +++ b/challenges/upper-intermediate-bonfires.json @@ -13,7 +13,6 @@ "These methods must be the only available means for interacting with the object.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], - "type": "bonfire", "challengeSeed": [ "var Person = function(firstAndLast) {", " return firstAndLast;", @@ -42,6 +41,7 @@ "Closures", "Details of the Object Model" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -56,7 +56,7 @@ }, { "id": "af4afb223120f7348cdfc9fd", - "title": "Bonfire: Map the Debris", + "title": "Map the Debris", "dashedName": "bonfire-map-the-debris", "difficulty": "3.02", "description": [ @@ -83,6 +83,7 @@ "MDNlinks": [ "Math.pow()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], @@ -105,7 +106,6 @@ "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], - "type": "bonfire", "challengeSeed": [ "function pairwise(arr, arg) {", " return arg;", @@ -123,6 +123,7 @@ "MDNlinks": [ "Array.reduce()" ], + "type": "bonfire", "challengeType": 5, "nameCn": "", "descriptionCn": [], From 2f714f1541e73da60b7d875a7c836d53c239e6d3 Mon Sep 17 00:00:00 2001 From: Isabell Long Date: Sun, 9 Aug 2015 19:32:10 +0000 Subject: [PATCH 54/66] Fix typos in the Basic Javascript challenge - Partially fixes #1519 - looks like some of those typos had already been fixed. --- challenges/basic-javascript.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index 888782e4b6..c8cd7046a9 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -35,7 +35,7 @@ "A boolean is a type of variable that represents either true or false (Named after the British mathematician George Boole).", "Booleans are often the result of a function or a comparative operation, for example 1==1is true whereas 1==2is false.", "They are most commonly found inside ifstatements which we shall cover later", - "For now Let's modify our welcomeToBooleansfunction so that it will return trueinstead of falsewhen the run button is clicked" + "For now let's modify our welcomeToBooleansfunction so that it will return trueinstead of falsewhen the run button is clicked" ], "tests": [ "assert(typeof(welcomeToBooleans())=='boolean', 'The value returned by welcomeToBooleans() should be a boolean value. (true of false)');", @@ -59,8 +59,8 @@ "description": [ "Now, use the var keyword to create a variable called myName. Set its value to your name.", "Variables are used to store values.", - "The name variable comes from the fact that it's value, varies!", - "Now Let's create our first variable called myName and because it's a name let's make it a string!", + "The name variable comes from the fact that its value varies!", + "Now let's create our first variable called myName and because it's a name let's make it a string!", "Be sure to use lowercase and uppercase letters properly. JavaScript variables are written in camel case. An example of camel case is: camelCase.", "Look at the ourName example if you get stuck." ], @@ -362,7 +362,7 @@ "title": "Create Decimal Numbers with JavaScript", "difficulty": "9.9815", "description": [ - "In JavaScript we can can work with decimal numbers.", + "In JavaScript we can work with decimal numbers.", "Let's create a variable myDecimal and give it a decimal value." ], "tests": [ @@ -385,7 +385,7 @@ "title": "Perform Arithmetic Operations on Decimals with JavaScript", "difficulty": "9.98151", "description": [ - "In JavaScript we can can work with decimal numbers." + "In JavaScript we can work with decimal numbers." ], "tests": [ "assert(multiply == 15, 'The result of multiply should be 3.75');", From 7ce1a06c54e938d36fd35159319d9d44b09596b2 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 9 Aug 2015 17:03:49 -0700 Subject: [PATCH 55/66] remove pair programming Bonfire warm up challenge --- challenges/basic-bonfires.json | 72 ++++++++-------------------------- 1 file changed, 16 insertions(+), 56 deletions(-) diff --git a/challenges/basic-bonfires.json b/challenges/basic-bonfires.json index af9c9a3bd3..2737a8fe54 100644 --- a/challenges/basic-bonfires.json +++ b/challenges/basic-bonfires.json @@ -2,46 +2,6 @@ "name": "Basic Algorithm Scripting", "order": 0.006, "challenges": [ - { - "id": "bd7139d8c441eddfaeb5bdef", - "name": "Waypoint: Pair Program on Bonfires", - "dashedName": "waypoint-pair-program-on-bonfires", - "difficulty": 0.44, - "challengeSeed": [ - "119657641" - ], - "description": [ - "Please note that the video for this challenge is a little outdated, and doesn't perfectly match these steps. We plan to record a new video soon.", - "OK, we're finally ready to start pair programming!", - "Pair Programming is where two people code together on the same computer. It is an efficient way to collaborate, and widely practiced at software companies. Pair Programming is one of the core concepts of \"Agile\" Software Development, which you will hear more about later.", - "Many people use Skype or Google Hangouts to pair program, but if you talk with professional software engineers, they will tell you that it's not really pair programming unless both people have the ability to use the keyboard and mouse.", - "The most popular tool for pair programming is Screenhero. You can download Screenhero for Mac or Windows. Create your new user account from within the app.", - "We have a special chat room for people ready to pair program. Go to our LetsPair chatroom on Gitter and type \"Hello Pair Programmers!\"", - "If someone is available, they will be your \"pair\" - the person you pair programming with.", - "If no one gets back to you in the first few minutes, don't worry. There will be lots of opportunities to pair program in the future.", - "If someone does get back to you, private message them and ask for the email address they used to register Screenhero.", - "Add them as a new contact in Screenhero, then click the monitor-looking button to attempt to share your screen with them.", - "Once the Screenhero session starts, your screen's margins will glow orange. You are now sharing your screen.", - "Your pair will have their own cursor, and will be able to type text on his or her keyboard.", - "Now it's time to tackle our Bonfires. You can begin them by advancing to the next challenge.", - "Once you you finish pair programming, end the session in Screenhero session.", - "Congratulations! You have completed your first pair programming session.", - "Pair program as much as possible with different campers until you've completed all the Bonfire challenges. This is a big time investment, but the JavaScript practice you get will be well worth it!", - "Mark this Waypoint complete and move on." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, { "id": "ad7123c8c441eddfaeb5bdef", "name": "Bonfire: Meet Bonfire", @@ -96,7 +56,7 @@ "Reverse the provided string.", "You may need to turn the string into an array before you can reverse it.", "Your result must be a string.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function reverseString(str) {", @@ -139,7 +99,7 @@ "If the integer is represented with the letter n, a factorial is the product of all positive integers less than or equal to n.", "Factorials are often represented with the shorthand notation n!", "For example: 5! = 1 * 2 * 3 * 4 * 5 = 120f", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function factorialize(num) {", @@ -173,7 +133,7 @@ "A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.", "You'll need to remove punctuation and turn everything lower case in order to check for palindromes.", "We'll pass strings with varying formats, such as \"racecar\", \"RaceCar\", and \"race CAR\" among others.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "tests": [ "expect(palindrome(\"eye\")).to.be.a(\"boolean\");", @@ -219,7 +179,7 @@ "description": [ "Return the length of the longest word in the provided sentence.", "Your response should be a number.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function findLongestWord(str) {", @@ -259,7 +219,7 @@ "description": [ "Return the provided string with the first letter of each word capitalized.", "For the purpose of this exercise, you should also capitalize connecting words like 'the' and 'of'.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function titleCase(str) {", @@ -298,7 +258,7 @@ "Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.", "Remember, you can iterate through an array with a simple for loop, and access each member with array syntax arr[i] .", "If you are writing your own Chai.js tests, be sure to use a deep equal statement instead of an equal statement when comparing arrays.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function largestOfFour(arr) {", @@ -335,7 +295,7 @@ "difficulty": "1.07", "description": [ "Check if a string (first argument) ends with the given target string (second argument).", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function end(str, target) {", @@ -375,7 +335,7 @@ "difficulty": "1.08", "description": [ "Repeat a given string (first argument) n times (second argument). Return an empty string if n is a negative number.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function repeat(str, num) {", @@ -413,7 +373,7 @@ "description": [ "Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a '...' ending.", "Note that the three dots at the end add to the string length.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function truncate(str, num) {", @@ -451,7 +411,7 @@ "difficulty": "1.10", "description": [ "Write a function that splits an array (first argument) into groups the length of size (second argument) and returns them as a multidimensional array.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function chunk(arr, size) {", @@ -489,7 +449,7 @@ "difficulty": "1.11", "description": [ "Return the remaining elements of an array after chopping off n elements from the head.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function slasher(arr, howMany) {", @@ -530,7 +490,7 @@ "For example, ['hello', 'Hello'], should return true because all of the letters in the second string are present in the first, ignoring case.", "The arguments ['hello', 'hey'] should return false because the string 'hello' does not contain a 'y'.", "Lastly, ['Alien', 'line'], should return true because all of the letters in 'line' are present in 'Alien'.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function mutation(arr) {", @@ -571,7 +531,7 @@ "description": [ "Remove all falsey values from an array.", "Falsey values in javascript are false, null, 0, \"\", undefined, and NaN.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function bouncer(arr) {", @@ -609,7 +569,7 @@ "difficulty": "1.55", "description": [ "Make a function that looks through an array (first argument) and returns an array of all objects that have equivalent property values (second argument).", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function where(collection, source) {", @@ -648,7 +608,7 @@ "difficulty": "1.60", "description": [ "You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function destroyer(arr) {", @@ -689,7 +649,7 @@ "description": [ "Return the lowest index at which a value (second argument) should be inserted into a sorted array (first argument).", "For example, where([1,2,3,4], 1.5) should return 1 because it is greater than 1 (0th index), but less than 2 (1st index).", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + "Remember to use RSAP if you get stuck. Write your own code." ], "challengeSeed": [ "function where(arr, num) {", From 30b913b2d8b99769c6c13798a44658f5caf47024 Mon Sep 17 00:00:00 2001 From: Shouvik Roy Date: Mon, 10 Aug 2015 07:32:57 +0530 Subject: [PATCH 56/66] Update basic-javascript.json to fix #1642 Fixed following issues #1639 : Fixed ```description``` to have "In JavaScript" instead of "in JavaScript" and added punctuation. #1640 #1641 Added punctuation and fixed typo to have "perform mathematical functions" instead of "preform mathematical functions". --- challenges/basic-javascript.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/challenges/basic-javascript.json b/challenges/basic-javascript.json index b8e088adc0..418a027fbb 100644 --- a/challenges/basic-javascript.json +++ b/challenges/basic-javascript.json @@ -272,9 +272,9 @@ "dashedName": "waypoint-add-two-numbers-with-javascript", "difficulty": "9.98141", "description": [ - "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", - "Let's try a few of the most commonly used ones now", - "We use +for addition", + "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.", + "Let's try a few of the most commonly used ones now.", + "We use +for addition.", "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ @@ -295,9 +295,9 @@ "dashedName": "waypoint-subtract-one-number-from-another-with-javascript", "difficulty": "9.98142", "description": [ - "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", - "Let's try a few of the most commonly used ones now", - "We use -for subtraction", + "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.", + "Let's try a few of the most commonly used ones now.", + "We use -for subtraction.", "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ @@ -318,9 +318,9 @@ "dashedName": "waypoint-multiply-two-numbers-with-javascript", "difficulty": "9.98143", "description": [ - "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", - "Let's try a few of the most commonly used ones now", - "We use *for multiplication", + "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.", + "Let's try a few of the most commonly used ones now.", + "We use *for multiplication.", "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ @@ -341,9 +341,9 @@ "dashedName": "waypoint-divide-one-number-by-another-with-javascript", "difficulty": "9.9814", "description": [ - "In JavaScript whole numbers (called integers) can be easily used to preform mathematical functions", - "Let's try a few of the most commonly used ones now", - "We use /for division", + "In JavaScript whole numbers (called integers) can be easily used to perform mathematical functions.", + "Let's try a few of the most commonly used ones now.", + "We use /for division.", "Replace the 0with correct number to achieve the result in the comment." ], "tests": [ @@ -364,7 +364,7 @@ "dashedName": "waypoint-create-decimal-numbers-with-javascript", "difficulty": "9.9815", "description": [ - "in JavaScript we can can work with decimal numbers", + "In JavaScript we can can work with decimal numbers.", "Let's create a variable myDecimal and give it a decimal value." ], "tests": [ From 6ba77ca9f687117359c66496ebb6bf37ddbdcc5f Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 9 Aug 2015 21:26:26 -0700 Subject: [PATCH 57/66] update curriculum structure again --- challenges/advanced-bonfires.json | 297 +++++++++++++---- challenges/expert-bonfires.json | 304 ------------------ ...t-oriented-and-functional-programming.json | 117 +------ challenges/upper-intermediate-bonfires.json | 139 ++++++++ 4 files changed, 372 insertions(+), 485 deletions(-) delete mode 100644 challenges/expert-bonfires.json create mode 100644 challenges/upper-intermediate-bonfires.json diff --git a/challenges/advanced-bonfires.json b/challenges/advanced-bonfires.json index c071bfb8b7..b197aad00f 100644 --- a/challenges/advanced-bonfires.json +++ b/challenges/advanced-bonfires.json @@ -1,46 +1,55 @@ { "name": "Advanced Algorithm Scripting", - "order": 0.011, + "order": 0.013, "challenges": [ { - "id": "a2f1d72d9b908d0bd72bb9f6", - "name": "Bonfire: Make a Person", - "dashedName": "bonfire-make-a-person", - "difficulty": "3.01", + "id": "aff0395860f5d3034dc0bfc9", + "name": "Bonfire: Validate US Telephone Numbers", + "dashedName": "bonfire-validate-us-telephone-numbers", + "difficulty": "4.01", "description": [ - "Fill in the object constructor with the methods specified in the tests.", - "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).", - "All functions that take an argument have an arity of 1, and the argument will be a string.", - "These methods must be the only available means for interacting with the object.", + "Return true if the passed string is a valid US phone number", + "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:", + "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555", + "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], - "challengeSeed": [ - "var Person = function(firstAndLast) {", - " return firstAndLast;", - "};", - "", - "var bob = new Person('Bob Ross');", - "bob.getFullName();" - ], "tests": [ - "expect(Object.keys(bob).length).to.eql(6);", - "expect(bob instanceof Person).to.be.true;", - "expect(bob.firstName).to.be.undefined();", - "expect(bob.lastName).to.be.undefined();", - "expect(bob.getFirstName()).to.eql('Bob');", - "expect(bob.getLastName()).to.eql('Ross');", - "expect(bob.getFullName()).to.eql('Bob Ross');", - "bob.setFirstName('Happy');", - "expect(bob.getFirstName()).to.eql('Happy');", - "bob.setLastName('Trees');", - "expect(bob.getLastName()).to.eql('Trees');", - "bob.setFullName('George Carlin');", - "expect(bob.getFullName()).to.eql('George Carlin');", - "bob.setFullName('Bob Ross');" + "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");", + "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"5555555555\"), true);", + "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);", + "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", + "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);", + "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);", + "assert.deepEqual(telephoneCheck(\"55555555\"), false);", + "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);", + "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);", + "assert.deepEqual(telephoneCheck(\"27576227382\"), false);", + "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);", + "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);", + "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);" + ], + "challengeSeed": [ + "function telephoneCheck(str) {", + " // Good luck!", + " return true;", + "}", + "", + "", + "", + "telephoneCheck(\"555-555-5555\");" ], "MDNlinks": [ - "Closures", - "Details of the Object Model" + "RegExp" ], "challengeType": 5, "nameCn": "", @@ -55,33 +64,31 @@ "descriptionPt": [] }, { - "id": "af4afb223120f7348cdfc9fd", - "name": "Bonfire: Map the Debris", - "dashedName": "bonfire-map-the-debris", - "difficulty": "3.02", + "id": "a3f503de51cf954ede28891d", + "name": "Bonfire: Symmetric Difference", + "dashedName": "bonfire-symmetric-difference", + "difficulty": "4.02", "description": [ - "Return a new array that transforms the element's average altitude into their orbital periods.", - "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", - "You can read about orbital periods on wikipedia.", - "The values should be rounded to the nearest whole number. The body being orbited is Earth.", - "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418", + "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", + "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ - "function orbitalPeriod(arr) {", - " var GM = 398600.4418;", - " var earthRadius = 6367.4447;", - " return arr;", + "function sym(args) {", + " return arguments;", "}", "", - "orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]);" + "sym([1, 2, 3], [5, 2, 1, 4]);" ], "tests": [ - "expect(orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputnik\", orbitalPeriod: 86400}]);", - "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" + "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);", + "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');", + "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');", + "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');" ], "MDNlinks": [ - "Math.pow()" + "Array.reduce()", + "Symmetric Difference" ], "challengeType": 5, "nameCn": "", @@ -96,32 +103,190 @@ "descriptionPt": [] }, { - "id": "a3f503de51cfab748ff001aa", - "name": "Bonfire: Pairwise", - "dashedName": "bonfire-pairwise", - "difficulty": "3.03", + "id": "aa2e6f85cab2ab736c9a9b24", + "name": "Bonfire: Exact Change", + "dashedName": "bonfire-exact-change", + "difficulty": "4.03", "description": [ - "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", - "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.", - "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", + "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", + "cid is a 2d array listing available currency.", + "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.", + "Otherwise, return change in coin and bills, sorted in highest to lowest order.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], "challengeSeed": [ - "function pairwise(arr, arg) {", - " return arg;", + "function drawer(price, cash, cid) {", + " var change;", + " // Here is your change, ma'am.", + " return change;", "}", "", - "pairwise([1,4,2,3,0,5], 7);" + "// Example cash-in-drawer array:", + "// [['PENNY', 1.01],", + "// ['NICKEL', 2.05],", + "// ['DIME', 3.10],", + "// ['QUARTER', 4.25],", + "// ['ONE', 90.00],", + "// ['FIVE', 55.00],", + "// ['TEN', 20.00],", + "// ['TWENTY', 60.00],", + "// ['ONE HUNDRED', 100.00]]", + "", + "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);" ], "tests": [ - "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);", - "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);", - "expect(pairwise([1,1,1], 2)).to.equal(1);", - "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);", - "expect(pairwise([], 100)).to.equal(0);" + "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');", + "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", + "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');", + "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');", + "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');" ], "MDNlinks": [ - "Array.reduce()" + "Global Object" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a56138aff60341a09ed6c480", + "name": "Bonfire: Inventory Update", + "dashedName": "bonfire-inventory-update", + "difficulty": "4.04", + "description": [ + "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function inventory(arr1, arr2) {", + " // All inventory must be accounted for or you're fired!", + " return arr1;", + "}", + "", + "// Example inventory lists", + "var curInv = [", + " [21, 'Bowling Ball'],", + " [2, 'Dirty Sock'],", + " [1, 'Hair Pin'],", + " [5, 'Microphone']", + "];", + "", + "var newInv = [", + " [2, 'Hair Pin'],", + " [3, 'Half-Eaten Apple'],", + " [67, 'Bowling Ball'],", + " [7, 'Toothpaste']", + "];", + "", + "inventory(curInv, newInv);" + ], + "tests": [ + "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');", + "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);", + "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);", + "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);", + "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);", + "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);" + ], + "MDNlinks": [ + "Global Array Object" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a7bf700cd123b9a54eef01d5", + "name": "Bonfire: No repeats please", + "dashedName": "bonfire-no-repeats-please", + "difficulty": "4.05", + "description": [ + "Return the number of total permutations of the provided string that don't have repeated consecutive letters.", + "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function permAlone(str) {", + " return str;", + "}", + "", + "permAlone('aab');" + ], + "tests": [ + "expect(permAlone('aab')).to.be.a('number');", + "expect(permAlone('aab')).to.equal(2);", + "expect(permAlone('aaa')).to.equal(0);", + "expect(permAlone('aabb')).to.equal(8);", + "expect(permAlone('abcdefa')).to.equal(3600);", + "expect(permAlone('abfdefa')).to.equal(2640);", + "expect(permAlone('zzzzzzzz')).to.equal(0);" + ], + "MDNlinks": [ + "Permutations", + "RegExp" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a19f0fbe1872186acd434d5a", + "name": "Bonfire: Friendly Date Ranges", + "dashedName": "bonfire-friendly-date-ranges", + "difficulty": "4.06", + "description": [ + "Implement a way of converting two dates into a more friendly date range that could be presented to a user.", + "It must not show any redundant information in the date range.", + "For example, if the year and month are the same then only the day range should be displayed.", + "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.", + "Input date is formatted as YYYY-MM-DD", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function friendly(str) {", + " return str;", + "}", + "", + "friendly(['2015-07-01', '2015-07-04']);" + ], + "tests": [ + "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');", + "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');", + "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);", + "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');", + "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');", + "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);" + ], + "MDNlinks": [ + "String.split()", + "String.substr()", + "parseInt()" ], "challengeType": 5, "nameCn": "", diff --git a/challenges/expert-bonfires.json b/challenges/expert-bonfires.json deleted file mode 100644 index 50bbe89de2..0000000000 --- a/challenges/expert-bonfires.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "name": "Expert Algorithm Scripting", - "order": 0.013, - "challenges": [ - { - "id": "aff0395860f5d3034dc0bfc9", - "name": "Bonfire: Validate US Telephone Numbers", - "dashedName": "bonfire-validate-us-telephone-numbers", - "difficulty": "4.01", - "description": [ - "Return true if the passed string is a valid US phone number", - "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:", - "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555", - "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "tests": [ - "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");", - "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"5555555555\"), true);", - "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);", - "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);", - "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);", - "assert.deepEqual(telephoneCheck(\"55555555\"), false);", - "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);", - "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"27576227382\"), false);", - "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);", - "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);", - "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);" - ], - "challengeSeed": [ - "function telephoneCheck(str) {", - " // Good luck!", - " return true;", - "}", - "", - "", - "", - "telephoneCheck(\"555-555-5555\");" - ], - "MDNlinks": [ - "RegExp" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a3f503de51cf954ede28891d", - "name": "Bonfire: Symmetric Difference", - "dashedName": "bonfire-symmetric-difference", - "difficulty": "4.02", - "description": [ - "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", - "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function sym(args) {", - " return arguments;", - "}", - "", - "sym([1, 2, 3], [5, 2, 1, 4]);" - ], - "tests": [ - "expect(sym([1, 2, 3], [5, 2, 1, 4])).to.equal([3, 5, 4]);", - "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]), [1, 4, 5], 'should return the symmetric difference of the given arrays');", - "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]), [1, 4, 5], 'should return an array of unique values');", - "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');" - ], - "MDNlinks": [ - "Array.reduce()", - "Symmetric Difference" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "aa2e6f85cab2ab736c9a9b24", - "name": "Bonfire: Exact Change", - "dashedName": "bonfire-exact-change", - "difficulty": "4.03", - "description": [ - "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", - "cid is a 2d array listing available currency.", - "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.", - "Otherwise, return change in coin and bills, sorted in highest to lowest order.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function drawer(price, cash, cid) {", - " var change;", - " // Here is your change, ma'am.", - " return change;", - "}", - "", - "// Example cash-in-drawer array:", - "// [['PENNY', 1.01],", - "// ['NICKEL', 2.05],", - "// ['DIME', 3.10],", - "// ['QUARTER', 4.25],", - "// ['ONE', 90.00],", - "// ['FIVE', 55.00],", - "// ['TEN', 20.00],", - "// ['TWENTY', 60.00],", - "// ['ONE HUNDRED', 100.00]]", - "", - "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);" - ], - "tests": [ - "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');", - "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", - "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');", - "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');" - ], - "MDNlinks": [ - "Global Object" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a56138aff60341a09ed6c480", - "name": "Bonfire: Inventory Update", - "dashedName": "bonfire-inventory-update", - "difficulty": "4.04", - "description": [ - "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function inventory(arr1, arr2) {", - " // All inventory must be accounted for or you're fired!", - " return arr1;", - "}", - "", - "// Example inventory lists", - "var curInv = [", - " [21, 'Bowling Ball'],", - " [2, 'Dirty Sock'],", - " [1, 'Hair Pin'],", - " [5, 'Microphone']", - "];", - "", - "var newInv = [", - " [2, 'Hair Pin'],", - " [3, 'Half-Eaten Apple'],", - " [67, 'Bowling Ball'],", - " [7, 'Toothpaste']", - "];", - "", - "inventory(curInv, newInv);" - ], - "tests": [ - "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');", - "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);", - "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);", - "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);" - ], - "MDNlinks": [ - "Global Array Object" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a7bf700cd123b9a54eef01d5", - "name": "Bonfire: No repeats please", - "dashedName": "bonfire-no-repeats-please", - "difficulty": "4.05", - "description": [ - "Return the number of total permutations of the provided string that don't have repeated consecutive letters.", - "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function permAlone(str) {", - " return str;", - "}", - "", - "permAlone('aab');" - ], - "tests": [ - "expect(permAlone('aab')).to.be.a('number');", - "expect(permAlone('aab')).to.equal(2);", - "expect(permAlone('aaa')).to.equal(0);", - "expect(permAlone('aabb')).to.equal(8);", - "expect(permAlone('abcdefa')).to.equal(3600);", - "expect(permAlone('abfdefa')).to.equal(2640);", - "expect(permAlone('zzzzzzzz')).to.equal(0);" - ], - "MDNlinks": [ - "Permutations", - "RegExp" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a19f0fbe1872186acd434d5a", - "name": "Bonfire: Friendly Date Ranges", - "dashedName": "bonfire-friendly-date-ranges", - "difficulty": "4.06", - "description": [ - "Implement a way of converting two dates into a more friendly date range that could be presented to a user.", - "It must not show any redundant information in the date range.", - "For example, if the year and month are the same then only the day range should be displayed.", - "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.", - "Input date is formatted as YYYY-MM-DD", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function friendly(str) {", - " return str;", - "}", - "", - "friendly(['2015-07-01', '2015-07-04']);" - ], - "tests": [ - "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');", - "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');", - "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);", - "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');", - "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');", - "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);" - ], - "MDNlinks": [ - "String.split()", - "String.substr()", - "parseInt()" - ], - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - } - ] -} diff --git a/challenges/object-oriented-and-functional-programming.json b/challenges/object-oriented-and-functional-programming.json index 93c85cb4ee..54b46060a3 100644 --- a/challenges/object-oriented-and-functional-programming.json +++ b/challenges/object-oriented-and-functional-programming.json @@ -1,119 +1,6 @@ { - "name": "Object Oriented and Functional Programming - Under Construction From Challenge 4 Onwards", - "order" : 0.009, + "name": "Object Oriented and Functional Programming - Coming Soon", + "order" : 0.010, "challenges": [ - { - "id": "bd7153d8c44eeddfaeb5bd0f", - "name": "Waypoint: Learn Scope Chains and Closures", - "dashedName": "waypoint-learn-scope-chains-and-closures", - "difficulty": 0.01, - "challengeSeed": ["133316031"], - "description": [ - "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", - "If you don't already have Cloud 9 account, create one now at http://c9.io.", - "Open up http://c9.io and sign in to your account.", - "Click on Create New Workspace at the top right of the c9.io page, then click on the \"Create a new workspace\" popup that appears below it the button after you click on it.", - "Give your workspace a name.", - "Choose Node.js in the selection area below the name field.", - "Click the Create button. Then click into your new workspace.", - "In the lower right hand corner you should see a terminal window. In this window use the following commands. You don't need to know what these mean at this point.", - "Install scope-chains-closures with this command: npm install -g scope-chains-closures", - "Now start the tutorial by running scope-chains-closures.", - "Note that you can resize the c9.io's windows by dragging their borders.", - "Make sure that you are always in your project's \"workspace\" directory. You can always navigate back to this directory by running this command: cd ~/workspace.", - "You can view this Node School module's source code on GitHub at https://github.com/jesstelford/scope-chains-closures.", - "Complete \"Scopes\"", - "Complete \"Scope Chains\"", - "Complete \"Global Scope and Shadowing\"", - "Complete \"Closures\"", - "Complete \"Garbage Collection\"", - "Once you've completed these steps, move on to our next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "bd7153d8b44eeddfaeb5bd0f", - "name": "Waypoint: Use Prototypes for Inheriting Properties", - "dashedName": "waypoint-use-prototypes-for-inheriting-properties", - "difficulty": 0.02, - "challengeSeed": ["133316036"], - "description": [ - "We'll build this Waypoint on Cloud 9, a powerful online code editor with a full Ubuntu Linux workspace, all running in the cloud.", - "If you don't already have Cloud 9 account, create one now at http://c9.io.", - "Open up http://c9.io and sign in to your account.", - "Click on Create New Workspace at the top right of the c9.io page, then click on the \"Create a new workspace\" popup that appears below it the button after you click on it.", - "Give your workspace a name.", - "Choose Node.js in the selection area below the name field.", - "Click the Create button. Then click into your new workspace.", - "In the lower right hand corner you should see a terminal window. In this window use the following commands. You don't need to know what these mean at this point.", - "Install planetproto with this command: npm install -g planetproto", - "Now start the tutorial by running planetproto.", - "Note that you can resize the c9.io's windows by dragging their borders.", - "Make sure that you are always in your project's \"workspace\" directory. You can always navigate back to this directory by running this command: cd ~/workspace.", - "You can view this Node School module's source code on GitHub at https://github.com/sporto/planetproto.", - "Complete \"Simple Objects\"", - "Complete \"Proto\"", - "Complete \"Dynamic Lookups\"", - "Complete \"Property Assignments\"", - "Complete \"Arrays and Objects\"", - "Complete \"Object Create\"", - "Complete \"Dot New\"", - "Complete \"Constructor Functions\"", - "Complete \"Implicit This\"", - "Note that you can skip the last challenge.", - "Once you've completed these steps, move on to our next challenge." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "bd7129d8c441eddfbeb5bddf", - "name": "Waypoint: Practice Functional Programming", - "dashedName": "waypoint-practice-functional-programming", - "difficulty": 0.01, - "challengeSeed": ["129169463"], - "description": [ - "Functional programming holds the key to unlocking JavaScript's powerful asynchronous features.", - "Jafar Husain's interactive Functional Programming course will familiarize you with the various ways you can recombine these functions.", - "Functional programming in JavaScript involves using five key functions: \"map\", \"reduce\", \"filter\", \"concatAll\", and \"zip\".", - "Click here to go to the challenge: http://jhusain.github.io/learnrx/.", - "You only need to complete the first 27 steps of this tutorial.", - "This challenge will take several hours, but don't worry. Jafar's website will save your progress (using your browser's local storage) so you don't need to finish it in one sitting.", - "If you've spent several minutes on one of these challenges, and still can't figure out its correct answer, you can click \"show answer\", then click \"run\" to advance to the next challenge. Be sure to read the correct answer and make sure you understand it before moving on." - ], - "challengeType": 2, - "tests": [], - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - } ] } diff --git a/challenges/upper-intermediate-bonfires.json b/challenges/upper-intermediate-bonfires.json new file mode 100644 index 0000000000..bfd765facb --- /dev/null +++ b/challenges/upper-intermediate-bonfires.json @@ -0,0 +1,139 @@ +{ + "name": "Upper Intermediate Algorithm Scripting", + "order": 0.011, + "challenges": [ + { + "id": "a2f1d72d9b908d0bd72bb9f6", + "name": "Bonfire: Make a Person", + "dashedName": "bonfire-make-a-person", + "difficulty": "3.01", + "description": [ + "Fill in the object constructor with the methods specified in the tests.", + "Those methods are getFirstName(), getLastName(), getFullName(), setFirstName(first), setLastName(last), and setFullName(firstAndLast).", + "All functions that take an argument have an arity of 1, and the argument will be a string.", + "These methods must be the only available means for interacting with the object.", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "var Person = function(firstAndLast) {", + " return firstAndLast;", + "};", + "", + "var bob = new Person('Bob Ross');", + "bob.getFullName();" + ], + "tests": [ + "expect(Object.keys(bob).length).to.eql(6);", + "expect(bob instanceof Person).to.be.true;", + "expect(bob.firstName).to.be.undefined();", + "expect(bob.lastName).to.be.undefined();", + "expect(bob.getFirstName()).to.eql('Bob');", + "expect(bob.getLastName()).to.eql('Ross');", + "expect(bob.getFullName()).to.eql('Bob Ross');", + "bob.setFirstName('Happy');", + "expect(bob.getFirstName()).to.eql('Happy');", + "bob.setLastName('Trees');", + "expect(bob.getLastName()).to.eql('Trees');", + "bob.setFullName('George Carlin');", + "expect(bob.getFullName()).to.eql('George Carlin');", + "bob.setFullName('Bob Ross');" + ], + "MDNlinks": [ + "Closures", + "Details of the Object Model" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "af4afb223120f7348cdfc9fd", + "name": "Bonfire: Map the Debris", + "dashedName": "bonfire-map-the-debris", + "difficulty": "3.02", + "description": [ + "Return a new array that transforms the element's average altitude into their orbital periods.", + "The array will contain objects in the format {name: 'name', avgAlt: avgAlt}.", + "You can read about orbital periods on wikipedia.", + "The values should be rounded to the nearest whole number. The body being orbited is Earth.", + "The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function orbitalPeriod(arr) {", + " var GM = 398600.4418;", + " var earthRadius = 6367.4447;", + " return arr;", + "}", + "", + "orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}]);" + ], + "tests": [ + "expect(orbitalPeriod([{name : \"sputnik\", avgAlt : 35873.5553}])).to.eqls([{name: \"sputnik\", orbitalPeriod: 86400}]);", + "expect(orbitalPeriod([{name: \"iss\", avgAlt: 413.6}, {name: \"hubble\", avgAlt: 556.7}, {name: \"moon\", avgAlt: 378632.553}])).to.eqls([{name : \"iss\", orbitalPeriod: 5557}, {name: \"hubble\", orbitalPeriod: 5734}, {name: \"moon\", orbitalPeriod: 2377399}]);" + ], + "MDNlinks": [ + "Math.pow()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + }, + { + "id": "a3f503de51cfab748ff001aa", + "name": "Bonfire: Pairwise", + "dashedName": "bonfire-pairwise", + "difficulty": "3.03", + "description": [ + "Return the sum of all indices of elements of 'arr' that can be paired with one other element to form a sum that equals the value in the second argument 'arg'. If multiple sums are possible, return the smallest sum. Once an element has been used, it cannot be reused to pair with another.", + "For example, pairwise([1, 4, 2, 3, 0, 5], 7) should return 11 because 4, 2, 3 and 5 can be paired with each other to equal 7.", + "pairwise([1, 3, 2, 4], 4) would only equal 1, because only the first two elements can be paired to equal 4, and the first element has an index of 0!", + "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." + ], + "challengeSeed": [ + "function pairwise(arr, arg) {", + " return arg;", + "}", + "", + "pairwise([1,4,2,3,0,5], 7);" + ], + "tests": [ + "expect(pairwise([1, 4, 2, 3, 0, 5], 7)).to.equal(11);", + "expect(pairwise([1, 3, 2, 4], 4)).to.equal(1);", + "expect(pairwise([1,1,1], 2)).to.equal(1);", + "expect(pairwise([0, 0, 0, 0, 1, 1], 1)).to.equal(10);", + "expect(pairwise([], 100)).to.equal(0);" + ], + "MDNlinks": [ + "Array.reduce()" + ], + "challengeType": 5, + "nameCn": "", + "descriptionCn": [], + "nameFr": "", + "descriptionFr": [], + "nameRu": "", + "descriptionRu": [], + "nameEs": "", + "descriptionEs": [], + "namePt": "", + "descriptionPt": [] + } + ] +} From a7ba4bacf87e7b32166ab8c43ed4bc274a99e0b8 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sun, 9 Aug 2015 22:14:31 -0700 Subject: [PATCH 58/66] fix challenge naming scheme --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index b2a4e3e84c..3dbbf9d869 100644 --- a/index.js +++ b/index.js @@ -39,6 +39,8 @@ Challenge.destroyAll(function(err, info) { challenges.forEach(function(file) { var challengeSpec = require('./challenges/' + file); var order = challengeSpec.order; + var block = challengeSpec.name; + var challenges = challengeSpec.challenges .map(function(challenge, index) { // NOTE(berks): add title for displaying in views @@ -46,11 +48,14 @@ Challenge.destroyAll(function(err, info) { _.capitalize(challenge.type) + ': ' + challenge.title.replace(/[^a-zA-Z0-9\s]/g, ''); + challenge.dashedName = challenge.name .toLowerCase() .replace(/\:/g, '') .replace(/\s/g, '-'); challenge.order = +('' + order + (index + 1)); + challenge.block = block; + return challenge; }); From b784ef90b639109646ca644626edbe7b7b9f96e7 Mon Sep 17 00:00:00 2001 From: Martin Kwan Date: Mon, 10 Aug 2015 00:40:12 -0700 Subject: [PATCH 59/66] Updated Pig Latin Link Updated link so it would open in a new tab instead of the current tab --- challenges/intermediate-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index a85f6367e6..965767fb2e 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -187,7 +187,7 @@ "difficulty": "2.04", "description": [ "Translate the provided string to pig latin.", - "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", + "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", "If a word begins with a vowel you just add \"way\" to the end.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], From 062d73af144683a395bdd8517f4662cee8ab6194 Mon Sep 17 00:00:00 2001 From: Brett Guillory Date: Mon, 10 Aug 2015 13:20:18 -0500 Subject: [PATCH 60/66] Fix for incorrect RGB test value RGB test value was testing for (0,0,255) which is B, should be testing for (0, 255,0), which is green. --- challenges/jquery-ajax-and-json.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/jquery-ajax-and-json.json b/challenges/jquery-ajax-and-json.json index fa3f8641a9..b024e4ef77 100644 --- a/challenges/jquery-ajax-and-json.json +++ b/challenges/jquery-ajax-and-json.json @@ -674,7 +674,7 @@ "Here's an example of how you would use the children() function: $('#left-well').children().css('color', 'blue')" ], "tests": [ - "assert($('#target6').css('color') === 'rgb(0, 0, 255)', 'Your \"target6\" element should have green text.')", + "assert($('#target6').css('color') === 'rgb(0, 255, 0), 'Your \"target6\" element should have green text.')", "assert(!editor.match(/\\.children\\(\\)\\.css/g), 'You should use the children() function to modify these elements.')", "assert(!editor.match(/
    /g), 'Only use jQuery to add these classes to the element.')" ], From b1003b403c8b78a5273aa26976e84603f8bd9d0a Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 10 Aug 2015 12:14:38 -0700 Subject: [PATCH 61/66] add to seed script: exit on error filter challenge blocks that do not have challenges --- index.js | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index 8c46b77f68..38305428a2 100644 --- a/index.js +++ b/index.js @@ -17,23 +17,25 @@ var Nonprofit = app.models.Nonprofit; var Job = app.models.Job; var counter = 0; var challenges = getFilesFor('challenges'); +// plus two accounts for nonprofits and jobs seed. +var numberToSave = challenges.length + 1; function completionMonitor() { // Increment counter counter++; // Exit if all challenges have been checked - if (counter > challenges.length) { + if (counter >= numberToSave) { process.exit(0); } // Log where in the seed order we're currently at - console.log('Call: ' + counter + "/" + challenges.length); + console.log('Call: ' + counter + '/' + numberToSave); } Challenge.destroyAll(function(err, info) { if (err) { - console.error(err); + throw err; } else { console.log('Deleted ', info); } @@ -42,6 +44,13 @@ Challenge.destroyAll(function(err, info) { var order = challengeSpec.order; var block = challengeSpec.name; + // challenge file has no challenges... + if (challengeSpec.challenges.length === 0) { + console.log('file %s has no challenges', file); + completionMonitor(); + return; + } + var challenges = challengeSpec.challenges .map(function(challenge, index) { // NOTE(berks): add title for displaying in views @@ -64,10 +73,10 @@ Challenge.destroyAll(function(err, info) { challenges, function(err) { if (err) { - console.log(err); + throw err; } else { console.log('Successfully parsed %s', file); - completionMonitor(); + completionMonitor(err); } } ); @@ -82,28 +91,28 @@ Nonprofit.destroyAll(function(err, info) { } Nonprofit.create(nonprofits, function(err, data) { if (err) { - console.log(err); + throw err; } else { console.log('Saved ', data); } - completionMonitor(); + completionMonitor(err); console.log('nonprofits'); }); }); Job.destroyAll(function(err, info) { if (err) { - console.error(err); + throw err; } else { console.log('Deleted ', info); } Job.create(jobs, function(err, data) { if (err) { - console.log(err); + console.log('error: ', err); } else { console.log('Saved ', data); } console.log('jobs'); - completionMonitor(); + completionMonitor(err); }); }); From ee0392482de85040950c8c0c648241931beb99d2 Mon Sep 17 00:00:00 2001 From: Martin Kwan Date: Mon, 10 Aug 2015 13:42:33 -0700 Subject: [PATCH 62/66] Update intermediate-bonfires.json --- challenges/intermediate-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index 965767fb2e..6a87b21446 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -187,7 +187,7 @@ "difficulty": "2.04", "description": [ "Translate the provided string to pig latin.", - "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", + "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", "If a word begins with a vowel you just add \"way\" to the end.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], From dbf92d04e1c4926c33ce726f6be51ee9a4269d0d Mon Sep 17 00:00:00 2001 From: Martin Kwan Date: Mon, 10 Aug 2015 14:42:37 -0700 Subject: [PATCH 63/66] Updated DNA Pairing link Updated link so it would open in a new tab instead of the current tab --- challenges/intermediate-bonfires.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index a85f6367e6..2187161c2a 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -229,7 +229,7 @@ "difficulty": "2.05", "description": [ "The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.", - "Base pairs are a pair of AT and CG. Match the missing element to the provided character.", + "Base pairs are a pair of AT and CG. Match the missing element to the provided character.", "Return the provided character as the first element in each array.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], From 3c4213dd03727c34feaa1ca08f30df5308c8af35 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 10 Aug 2015 17:35:16 -0700 Subject: [PATCH 64/66] fix missing quote escape --- challenges/intermediate-bonfires.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/challenges/intermediate-bonfires.json b/challenges/intermediate-bonfires.json index 1f2c681c89..743f4d2e1a 100644 --- a/challenges/intermediate-bonfires.json +++ b/challenges/intermediate-bonfires.json @@ -187,7 +187,7 @@ "difficulty": "2.04", "description": [ "Translate the provided string to pig latin.", - "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", + "Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an \"ay\".", "If a word begins with a vowel you just add \"way\" to the end.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], @@ -229,7 +229,7 @@ "difficulty": "2.05", "description": [ "The DNA strand is missing the pairing element. Match each character with the missing element and return the results as a 2d array.", - "Base pairs are a pair of AT and CG. Match the missing element to the provided character.", + "Base pairs are a pair of AT and CG. Match the missing element to the provided character.", "Return the provided character as the first element in each array.", "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." ], From 93df41acc658c830b3ed47a0b8b6562f6dd0498b Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Mon, 10 Aug 2015 17:40:45 -0700 Subject: [PATCH 65/66] fix duplicate id's --- challenges/expert-bonfires.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/challenges/expert-bonfires.json b/challenges/expert-bonfires.json index 06ab698fb1..13bbd967de 100644 --- a/challenges/expert-bonfires.json +++ b/challenges/expert-bonfires.json @@ -3,7 +3,7 @@ "order": 0.013, "challenges": [ { - "id": "aff0395860f5d3034dc0bfc9", + "id": "aff0495970f5d3034dc0bfc9", "title": "Validate US Telephone Numbers", "difficulty": "4.01", "description": [ @@ -64,7 +64,7 @@ "descriptionPt": [] }, { - "id": "a3f503de51cf954ede28891d", + "id": "a3f512de51cf954ede28891d", "title": "Symmetric Difference", "difficulty": "4.02", "description": [ @@ -103,7 +103,7 @@ "descriptionPt": [] }, { - "id": "aa2e6f85cab2ab736c9a9b24", + "id": "aa2e6f96cab3ab736c9a9b24", "title": "Exact Change", "difficulty": "4.03", "description": [ @@ -159,7 +159,7 @@ "descriptionPt": [] }, { - "id": "a56138aff60341a09ed6c480", + "id": "a56244aff60341a09ed6c480", "title": "Inventory Update", "difficulty": "4.04", "description": [ @@ -214,7 +214,7 @@ "descriptionPt": [] }, { - "id": "a7bf700cd123b9a54eef01d5", + "id": "a8bf800cd123b9a54eef01d5", "title": "No repeats please", "difficulty": "4.05", "description": [ @@ -256,7 +256,7 @@ "descriptionPt": [] }, { - "id": "a19f0fbe1872186acd434d5a", + "id": "a19f0fbe1872186acd434d54", "title": "Friendly Date Ranges", "difficulty": "4.06", "description": [ From eb5d275d23aed44da20a16f43bbfd9129dad5612 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Mon, 10 Aug 2015 20:13:13 -0700 Subject: [PATCH 66/66] improve get-started view and fix duplicate bonfire issue --- challenges/expert-bonfires.json | 304 -------------------------------- 1 file changed, 304 deletions(-) delete mode 100644 challenges/expert-bonfires.json diff --git a/challenges/expert-bonfires.json b/challenges/expert-bonfires.json deleted file mode 100644 index d5322b08f3..0000000000 --- a/challenges/expert-bonfires.json +++ /dev/null @@ -1,304 +0,0 @@ -{ - "name": "Expert Algorithm Scripting", - "order": 0.013, - "challenges": [ - { - "id": "aff0495970f5d3034dc0bfc9", - "title": "Validate US Telephone Numbers", - "difficulty": "4.01", - "description": [ - "Return true if the passed string is a valid US phone number", - "The user may fill out the form field any way they choose as long as it is a valid US number. The following are all valid formats for US numbers:", - "555-555-5555, (555)555-5555, (555) 555-5555, 555 555 5555, 5555555555, 1 555 555 5555", - "For this challenge you will be presented with a string such as \"800-692-7753\" or \"8oo-six427676;laskdjf\". Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is \"1\". Return true if the string is a valid US phone number; otherwise false.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "tests": [ - "expect(telephoneCheck(\"555-555-5555\")).to.be.a(\"boolean\");", - "assert.deepEqual(telephoneCheck(\"1 555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 (555) 555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"5555555555\"), true);", - "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"(555)555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1(555)555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 555 555 5555\"), true);", - "assert.deepEqual(telephoneCheck(\"555-555-5555\"), true);", - "assert.deepEqual(telephoneCheck(\"1 456 789 4444\"), true);", - "assert.deepEqual(telephoneCheck(\"123**&!!asdf#\"), false);", - "assert.deepEqual(telephoneCheck(\"55555555\"), false);", - "assert.deepEqual(telephoneCheck(\"(6505552368)\"), false);", - "assert.deepEqual(telephoneCheck(\"2 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"0 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"-1 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"2 757 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"10 (757) 622-7382\"), false);", - "assert.deepEqual(telephoneCheck(\"27576227382\"), false);", - "assert.deepEqual(telephoneCheck(\"(275)76227382\"), false);", - "assert.deepEqual(telephoneCheck(\"2(757)6227382\"), false);", - "assert.deepEqual(telephoneCheck(\"2(757)622-7382\"), false);" - ], - "challengeSeed": [ - "function telephoneCheck(str) {", - " // Good luck!", - " return true;", - "}", - "", - "", - "", - "telephoneCheck(\"555-555-5555\");" - ], - "MDNlinks": [ - "RegExp" - ], - "type": "bonfire", - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a3f512de51cf954ede28891d", - "title": "Symmetric Difference", - "difficulty": "4.02", - "description": [ - "Create a function that takes two or more arrays and returns an array of the symmetric difference of the provided arrays.", - "The mathematical term symmetric difference refers to the elements in two sets that are in either the first or second set, but not in both.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function sym(args) {", - " return arguments;", - "}", - "", - "sym([1, 2, 3], [5, 2, 1, 4]);" - ], - "tests": [ - "assert.deepEqual(sym([1, 2, 3], [5, 2, 1, 4]).sort(), [3, 4, 5], 'should return the symmetric difference of the given arrays');", - "assert.deepEqual(sym([1, 2, 5], [2, 3, 5], [3, 4, 5]).sort(), [1, 4, 5], 'should return the symmetric difference of the given arrays');", - "assert.deepEqual(sym([1, 1, 2, 5], [2, 2, 3, 5], [3, 4, 5, 5]).sort(), [1, 4, 5], 'should return an array of unique values');", - "assert.deepEqual(sym([1, 1]), [1], 'should return an array of unique values');" - ], - "MDNlinks": [ - "Array.reduce()", - "Symmetric Difference" - ], - "type": "bonfire", - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "aa2e6f96cab3ab736c9a9b24", - "title": "Exact Change", - "difficulty": "4.03", - "description": [ - "Design a cash register drawer function that accepts purchase price as the first argument, payment as the second argument, and cash-in-drawer (cid) as the third argument.", - "cid is a 2d array listing available currency.", - "Return the string \"Insufficient Funds\" if cash-in-drawer is less than the change due. Return the string \"Closed\" if cash-in-drawer is equal to the change due.", - "Otherwise, return change in coin and bills, sorted in highest to lowest order.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function drawer(price, cash, cid) {", - " var change;", - " // Here is your change, ma'am.", - " return change;", - "}", - "", - "// Example cash-in-drawer array:", - "// [['PENNY', 1.01],", - "// ['NICKEL', 2.05],", - "// ['DIME', 3.10],", - "// ['QUARTER', 4.25],", - "// ['ONE', 90.00],", - "// ['FIVE', 55.00],", - "// ['TEN', 20.00],", - "// ['TWENTY', 60.00],", - "// ['ONE HUNDRED', 100.00]]", - "", - "drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]);" - ], - "tests": [ - "expect(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]])).to.be.a('array');", - "expect(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", - "expect(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]])).to.be.a('string');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['QUARTER', 0.50]], 'return correct change');", - "assert.deepEqual(drawer(3.26, 100.00, [['PENNY', 1.01], ['NICKEL', 2.05], ['DIME', 3.10], ['QUARTER', 4.25], ['ONE', 90.00], ['FIVE', 55.00], ['TEN', 20.00], ['TWENTY', 60.00], ['ONE HUNDRED', 100.00]]), [['TWENTY', 60.00], ['TEN', 20.00], ['FIVE', 15], ['ONE', 1], ['QUARTER', 0.50], ['DIME', 0.20], ['PENNY', 0.04] ], 'return correct change with multiple coins and bills');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.01], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), 'Insufficient Funds', 'insufficient funds');", - "assert.deepEqual(drawer(19.50, 20.00, [['PENNY', 0.50], ['NICKEL', 0], ['DIME', 0], ['QUARTER', 0], ['ONE', 0], ['FIVE', 0], ['TEN', 0], ['TWENTY', 0], ['ONE HUNDRED', 0]]), \"Closed\", 'cash-in-drawer equals change');" - ], - "MDNlinks": [ - "Global Object" - ], - "type": "bonfire", - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a56244aff60341a09ed6c480", - "title": "Inventory Update", - "difficulty": "4.04", - "description": [ - "Compare and update inventory stored in a 2d array against a second 2d array of a fresh delivery. Update current inventory item quantity, and if an item cannot be found, add the new item and quantity into the inventory array in alphabetical order.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function inventory(arr1, arr2) {", - " // All inventory must be accounted for or you're fired!", - " return arr1;", - "}", - "", - "// Example inventory lists", - "var curInv = [", - " [21, 'Bowling Ball'],", - " [2, 'Dirty Sock'],", - " [1, 'Hair Pin'],", - " [5, 'Microphone']", - "];", - "", - "var newInv = [", - " [2, 'Hair Pin'],", - " [3, 'Half-Eaten Apple'],", - " [67, 'Bowling Ball'],", - " [7, 'Toothpaste']", - "];", - "", - "inventory(curInv, newInv);" - ], - "tests": [ - "expect(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']])).to.be.a('array');", - "assert.equal(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]).length, 6);", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[88, 'Bowling Ball'], [2, 'Dirty Sock'], [3, 'Hair Pin'], [3, 'Half-Eaten Apple'], [5, 'Microphone'], [7, 'Toothpaste']]);", - "assert.deepEqual(inventory([[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']], []), [[21, 'Bowling Ball'], [2, 'Dirty Sock'], [1, 'Hair Pin'], [5, 'Microphone']]);", - "assert.deepEqual(inventory([], [[2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [67, 'Bowling Ball'], [7, 'Toothpaste']]), [[67, 'Bowling Ball'], [2, 'Hair Pin'], [3, 'Half-Eaten Apple'], [7, 'Toothpaste']]);", - "assert.deepEqual(inventory([[0, 'Bowling Ball'], [0, 'Dirty Sock'], [0, 'Hair Pin'], [0, 'Microphone']], [[1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [1, 'Bowling Ball'], [1, 'Toothpaste']]), [[1, 'Bowling Ball'], [0, 'Dirty Sock'], [1, 'Hair Pin'], [1, 'Half-Eaten Apple'], [0, 'Microphone'], [1, 'Toothpaste']]);" - ], - "MDNlinks": [ - "Global Array Object" - ], - "type": "bonfire", - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a8bf800cd123b9a54eef01d5", - "title": "No repeats please", - "difficulty": "4.05", - "description": [ - "Return the number of total permutations of the provided string that don't have repeated consecutive letters.", - "For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function permAlone(str) {", - " return str;", - "}", - "", - "permAlone('aab');" - ], - "tests": [ - "expect(permAlone('aab')).to.be.a('number');", - "expect(permAlone('aab')).to.equal(2);", - "expect(permAlone('aaa')).to.equal(0);", - "expect(permAlone('aabb')).to.equal(8);", - "expect(permAlone('abcdefa')).to.equal(3600);", - "expect(permAlone('abfdefa')).to.equal(2640);", - "expect(permAlone('zzzzzzzz')).to.equal(0);" - ], - "MDNlinks": [ - "Permutations", - "RegExp" - ], - "type": "bonfire", - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - }, - { - "id": "a19f0fbe1872186acd434d54", - "title": "Friendly Date Ranges", - "difficulty": "4.06", - "description": [ - "Implement a way of converting two dates into a more friendly date range that could be presented to a user.", - "It must not show any redundant information in the date range.", - "For example, if the year and month are the same then only the day range should be displayed.", - "Secondly, if the starting year is the current year, and the ending year can be inferred by the reader, the year should be omitted.", - "Input date is formatted as YYYY-MM-DD", - "Remember to use RSAP if you get stuck. Try to pair program. Write your own code." - ], - "challengeSeed": [ - "function friendly(str) {", - " return str;", - "}", - "", - "friendly(['2015-07-01', '2015-07-04']);" - ], - "tests": [ - "assert.deepEqual(friendly(['2015-07-01', '2015-07-04']), ['July 1st','4th'], 'ending month should be omitted since it is already mentioned');", - "assert.deepEqual(friendly(['2015-12-01', '2016-02-03']), ['December 1st','February 3rd'], 'two months apart can be inferred if it is the next year');", - "assert.deepEqual(friendly(['2015-12-01', '2017-02-03']), ['December 1st, 2015','February 3rd, 2017']);", - "assert.deepEqual(friendly(['2016-03-01', '2016-05-05']), ['March 1st','May 5th'], 'one month apart can be inferred it is the same year');", - "assert.deepEqual(friendly(['2017-01-01', '2017-01-01']), ['January 1st, 2017'], 'since we do not duplicate only return once');", - "assert.deepEqual(friendly(['2022-09-05', '2023-09-04']), ['September 5th, 2022','September 4th, 2023']);" - ], - "MDNlinks": [ - "String.split()", - "String.substr()", - "parseInt()" - ], - "type": "bonfire", - "challengeType": 5, - "nameCn": "", - "descriptionCn": [], - "nameFr": "", - "descriptionFr": [], - "nameRu": "", - "descriptionRu": [], - "nameEs": "", - "descriptionEs": [], - "namePt": "", - "descriptionPt": [] - } - ] -}