Merge branch 'staging' into onboarding

pull/18182/head
Quincy Larson 2015-08-10 15:42:07 -07:00
commit 59e6204768
20 changed files with 874 additions and 575 deletions

View File

@ -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) {

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "aff0395860f5d3034dc0bfc9",
"name": "Bonfire: Validate US Telephone Numbers",
"dashedName": "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",
@ -51,6 +50,7 @@
"MDNlinks": [
"RegExp"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -65,8 +65,7 @@
},
{
"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.",
@ -90,6 +89,7 @@
"Array.reduce()",
"Symmetric Difference"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -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.",
@ -146,6 +145,7 @@
"MDNlinks": [
"Global Object"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -160,8 +160,7 @@
},
{
"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.",
@ -201,6 +200,7 @@
"MDNlinks": [
"Global Array Object"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -215,8 +215,7 @@
},
{
"id": "a7bf700cd123b9a54eef01d5",
"name": "Bonfire: No repeats please",
"dashedName": "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.",
@ -243,6 +242,7 @@
"Permutations",
"RegExp"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -257,7 +257,7 @@
},
{
"id": "a19f0fbe1872186acd434d5a",
"name": "Bonfire: Friendly Date Ranges",
"title": "Friendly Date Ranges",
"dashedName": "bonfire-friendly-date-ranges",
"difficulty": "4.06",
"description": [
@ -288,6 +288,7 @@
"String.substr()",
"parseInt()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7154d8c441eddfaeb5bdef",
"name": "Waypoint: Get Started with Angular.js",
"dashedName": "waypoint-get-started-with-angularjs",
"title": "Get Started with Angular.js",
"difficulty": 0.34,
"challengeSeed": ["114684726"],
"description": [
@ -13,6 +12,7 @@
"In this course, we'll build a virtual shop entirely in Angular.js.",
"Go to <a href='http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/1/section/1/video/1' target='_blank'>http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/1/section/1/video/1</a> and complete the section."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@ -28,8 +28,7 @@
},
{
"id": "bd7155d8c441eddfaeb5bdef",
"name": "Waypoint: Apply Angular.js Directives",
"dashedName": "waypoint-apply-angularjs-directives",
"title": "Apply Angular.js Directives",
"difficulty": 0.35,
"challengeSeed": ["114684727"],
"description": [
@ -37,6 +36,7 @@
"Let's learn how these powerful directives work, and how to use them to make your web apps more dynamic",
"Go to <a href='http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/2/section/1/video/1' target='_blank'>http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/2/section/1/video/1</a> and complete the section."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@ -52,8 +52,7 @@
},
{
"id": "bd7156d8c441eddfaeb5bdef",
"name": "Waypoint: Power Forms with Angular.js",
"dashedName": "waypoint-power-forms-with-angularjs",
"title": "Power Forms with Angular.js",
"difficulty": 0.36,
"challengeSeed": ["114684729"],
"description": [
@ -61,6 +60,7 @@
"Learn how to create reactive Angular.js forms, including real-time form validation.",
"Go to <a href='http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/3/section/1/video/1' target='_blank'>http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/3/section/1/video/1</a> and complete the section."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@ -76,14 +76,14 @@
},
{
"id": "bd7157d8c441eddfaeb5bdef",
"name": "Waypoint: Customize Angular.js Directives",
"dashedName": "waypoint-customize-angularjs-directives",
"title": "Customize Angular.js Directives",
"difficulty": 0.37,
"challengeSeed": ["114685062"],
"description": [
"Now we'll learn how to modify existing Angular.js directives, and even build directives of your own.",
"Go to <a href='http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/4/section/1/video/1' target='_blank'>http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/4/section/1/video/1</a> and complete the section."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@ -99,8 +99,7 @@
},
{
"id": "bd7158d8c441eddfaeb5bdef",
"name": "Waypoint: Create Angular.js Services",
"dashedName": "waypoint-create-angularjs-services",
"title": "Create Angular.js Services",
"difficulty": 0.38,
"challengeSeed": ["114685060"],
"description": [
@ -108,6 +107,7 @@
"We'll learn how to use services in this final Code School Angular.js challenge.",
"Go to <a href='http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/5/section/1/video/1' target='_blank'>http://campus.codeschool.com/courses/shaping-up-with-angular-js/level/5/section/1/video/1</a> and complete the section."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7158d8c443eddfaeb5bcef",
"name": "Waypoint: Get Set for Basejumps",
"dashedName": "waypoint-get-set-for-basejumps",
"title": "Get Set for Basejumps",
"difficulty": 2.00,
"challengeSeed": ["128451852"],
"description": [
@ -60,13 +59,13 @@
"If you need further guidance on using Yeoman Angular-Fullstack Generator, check out: <a href='https://github.com/clnhll/guidetobasejumps' target='_blank'>https://github.com/clnhll/guidetobasejumps</a>.",
"Now you're ready to move on to your first Basejump. Click the \"I've completed this challenge\" and move on."
],
"type": "waypoint",
"challengeType": 2,
"tests": []
},
{
"id": "bd7158d8c443eddfaeb5bdef",
"name": "Basejump: Build a Voting App",
"dashedName": "basejump-build-a-voting-app",
"title": "Build a Voting App",
"difficulty": 2.01,
"challengeSeed": ["133315786"],
"description": [
@ -87,6 +86,7 @@
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "basejumps",
"challengeType": 4,
"tests": [],
"nameCn": "",
@ -102,8 +102,7 @@
},
{
"id": "bd7158d8c443eddfaeb5bdff",
"name": "Basejump: Build a Nightlife Coordination App",
"dashedName": "basejump-build-a-nightlife-coordination-app",
"title": "Build a Nightlife Coordination App",
"difficulty": 2.02,
"challengeSeed": ["133315781"],
"description": [
@ -121,6 +120,7 @@
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "basejumps",
"challengeType": 4,
"tests": [],
"nameCn": "",
@ -136,8 +136,7 @@
},
{
"id": "bd7158d8c443eddfaeb5bd0e",
"name": "Basejump: Chart the Stock Market",
"dashedName": "basejump-chart-the-stock-market",
"title": "Chart the Stock Market",
"difficulty": 2.03,
"challengeSeed": ["133315787"],
"description": [
@ -154,6 +153,7 @@
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "basejumps",
"challengeType": 4,
"tests": [],
"nameCn": "",
@ -169,8 +169,7 @@
},
{
"id": "bd7158d8c443eddfaeb5bd0f",
"name": "Basejump: Manage a Book Trading Club",
"dashedName": "basejump-manage-a-book-trading-club",
"title": "Manage a Book Trading Club",
"difficulty": 2.04,
"challengeSeed": ["133316032"],
"description": [
@ -187,6 +186,7 @@
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "basejumps",
"challengeType": 4,
"tests": [],
"nameCn": "",
@ -202,8 +202,7 @@
},
{
"id": "bd7158d8c443eddfaeb5bdee",
"name": "Basejump: Build a Pinterest Clone",
"dashedName": "basejump-build-a-pinterest-clone",
"title": "Build a Pinterest Clone",
"difficulty": 2.05,
"challengeSeed": ["133315784"],
"description": [
@ -223,6 +222,7 @@
"Once you've finished implementing these user stories, click the \"I've completed this challenge\" button and enter the URLs for both your GitHub repository and your live app running on Heroku. If you pair programmed with a friend, enter his or her Free Code Camp username as well so that you both get credit for completing it.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your Heroku project. Otherwise, we'll review it before you start your nonprofit projects.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "basejumps",
"challengeType": 4,
"tests": [],
"nameCn": "",

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "ad7123c8c441eddfaeb5bdef",
"name": "Bonfire: Meet Bonfire",
"dashedName": "bonfire-meet-bonfire",
"title": "Meet Bonfire",
"difficulty": "0",
"description": [
"Your goal is to fix the failing test.",
@ -29,6 +28,7 @@
"",
"meetBonfire(\"You can do this!\");"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -43,8 +43,7 @@
},
{
"id": "a202eed8fc186c8434cb6d61",
"name": "Bonfire: Reverse a String",
"dashedName": "bonfire-reverse-a-string",
"title": "Reverse a String",
"difficulty": "1.01",
"tests": [
"expect(reverseString('hello')).to.be.a('String');",
@ -71,6 +70,7 @@
"Array.reverse()",
"Array.join()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -85,8 +85,7 @@
},
{
"id": "a302f7aae1aa3152a5b413bc",
"name": "Bonfire: Factorialize a Number",
"dashedName": "bonfire-factorialize-a-number",
"title": "Factorialize a Number",
"tests": [
"expect(factorialize(5)).to.be.a(\"Number\");",
"expect(factorialize(5)).to.equal(120);",
@ -111,6 +110,7 @@
"MDNlinks": [
"Arithmetic Operators"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -125,8 +125,7 @@
},
{
"id": "aaa48de84e1ecc7c742e1124",
"name": "Bonfire: Check for Palindromes",
"dashedName": "bonfire-check-for-palindromes",
"title": "Check for Palindromes",
"difficulty": "1.03",
"description": [
"Return true if the given string is a palindrome. Otherwise, return false.",
@ -159,6 +158,7 @@
"String.replace()",
"String.toLowerCase()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -173,8 +173,7 @@
},
{
"id": "a26cbbe9ad8655a977e1ceb5",
"name": "Bonfire: Find the Longest Word in a String",
"dashedName": "bonfire-find-the-longest-word-in-a-string",
"title": "Find the Longest Word in a String",
"difficulty": "1.04",
"description": [
"Return the length of the longest word in the provided sentence.",
@ -199,6 +198,7 @@
"String.split()",
"String.length"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -213,8 +213,7 @@
},
{
"id": "ab6137d4e35944e21037b769",
"name": "Bonfire: Title Case a Sentence",
"dashedName": "bonfire-title-case-a-sentence",
"title": "Title Case a Sentence",
"difficulty": "1.05",
"description": [
"Return the provided string with the first letter of each word capitalized.",
@ -237,6 +236,7 @@
"MDNlinks": [
"String.charAt()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -251,8 +251,7 @@
},
{
"id": "a789b3483989747d63b0e427",
"name": "Bonfire: Return Largest Numbers in Arrays",
"dashedName": "bonfire-return-largest-numbers-in-arrays",
"title": "Return Largest Numbers in Arrays",
"difficulty": "1.06",
"description": [
"Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.",
@ -276,6 +275,7 @@
"MDNlinks": [
"Comparison Operators"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -290,8 +290,7 @@
},
{
"id": "acda2fb1324d9b0fa741e6b5",
"name": "Bonfire: Confirm the Ending",
"dashedName": "bonfire-confirm-the-ending",
"title": "Confirm the Ending",
"difficulty": "1.07",
"description": [
"Check if a string (first argument) ends with the given target string (second argument).",
@ -316,6 +315,7 @@
"MDNlinks": [
"String.substr()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -330,8 +330,7 @@
},
{
"id": "afcc8d540bea9ea2669306b6",
"name": "Bonfire: Repeat a string repeat a string",
"dashedName": "bonfire-repeat-a-string-repeat-a-string",
"title": "Repeat a string repeat a string",
"difficulty": "1.08",
"description": [
"Repeat a given string (first argument) n times (second argument). Return an empty string if n is a negative number.",
@ -353,6 +352,7 @@
"MDNlinks": [
"Global String Object"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -367,8 +367,7 @@
},
{
"id": "ac6993d51946422351508a41",
"name": "Bonfire: Truncate a string",
"dashedName": "bonfire-truncate-a-string",
"title": "Truncate a string",
"difficulty": "1.09",
"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.",
@ -392,6 +391,7 @@
"MDNlinks": [
"String.slice()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -406,8 +406,7 @@
},
{
"id": "a9bd25c716030ec90084d8a1",
"name": "Bonfire: Chunky Monkey",
"dashedName": "bonfire-chunky-monkey",
"title": "Chunky Monkey",
"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.",
@ -430,6 +429,7 @@
"MDNlinks": [
"Array.push()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -444,8 +444,7 @@
},
{
"id": "ab31c21b530c0dafa9e241ee",
"name": "Bonfire: Slasher Flick",
"dashedName": "bonfire-slasher-flick",
"title": "Slasher Flick",
"difficulty": "1.11",
"description": [
"Return the remaining elements of an array after chopping off n elements from the head.",
@ -468,6 +467,7 @@
"Array.slice()",
"Array.splice()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -482,8 +482,7 @@
},
{
"id": "af2170cad53daa0770fabdea",
"name": "Bonfire: Mutations",
"dashedName": "bonfire-mutations",
"title": "Mutations",
"difficulty": "1.12",
"description": [
"Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.",
@ -511,6 +510,7 @@
"MDNlinks": [
"Array.indexOf()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -525,8 +525,7 @@
},
{
"id": "adf08ec01beb4f99fc7a68f2",
"name": "Bonfire: Falsey Bouncer",
"dashedName": "bonfire-falsey-bouncer",
"title": "Falsey Bouncer",
"difficulty": "1.50",
"description": [
"Remove all falsey values from an array.",
@ -550,6 +549,7 @@
"Boolean Objects",
"Array.filter()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -564,8 +564,7 @@
},
{
"id": "a8e512fbe388ac2f9198f0fa",
"name": "Bonfire: Where art thou",
"dashedName": "bonfire-where-art-thou",
"title": "Where art thou",
"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).",
@ -589,6 +588,7 @@
"Object.hasOwnProperty()",
"Object.keys()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -603,8 +603,7 @@
},
{
"id": "a39963a4c10bc8b4d4f06d7e",
"name": "Bonfire: Seek and Destroy",
"dashedName": "bonfire-seek-and-destroy",
"title": "Seek and Destroy",
"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.",
@ -629,6 +628,7 @@
"Arguments object",
"Array.filter()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -643,8 +643,7 @@
},
{
"id": "a24c1a4622e3c05097f71d67",
"name": "Bonfire: Where do I belong",
"dashedName": "bonfire-where-do-i-belong",
"title": "Where do I belong",
"difficulty": "1.61",
"description": [
"Return the lowest index at which a value (second argument) should be inserted into a sorted array (first argument).",
@ -666,6 +665,7 @@
"expect(where([10, 20, 30, 40, 50], 35)).to.equal(3);",
"expect(where([10, 20, 30, 40, 50], 30)).to.equal(2);"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id":"bd7123c9c441eddfaeb4bdef",
"name": "Waypoint: Comment your JavaScript Code",
"dashedName": "waypoint-comment-your-javascript-code",
"title": "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",
@ -23,21 +22,20 @@
"assert(editor.getValue().match(/(\\/\\/)...../g), 'Make sure that there is at least one \\/\\/ style comment with at least five letters in it');"
],
"challengeSeed":[
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c441eddfaeb5bdef",
"name": "Waypoint: Understand Boolean Values",
"dashedName": "waypoint-understand-boolean-values",
"title": "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 <code>1==1</code>is true whereas <code>1==2</code>is false.",
"They are most commonly found inside <code>if</code>statements which we shall cover later",
"For now Let's modify our <code>welcomeToBooleans</code>function so that it will return <code>true</code>instead of <code>false</code>when the run button is clicked"
"For now let's modify our <code>welcomeToBooleans</code>function so that it will return <code>true</code>instead of <code>false</code>when the run button is clicked"
],
"tests": [
"assert(typeof(welcomeToBooleans())=='boolean', 'The value returned by welcomeToBooleans() should be a boolean value. (true of false)');",
@ -51,18 +49,18 @@
"",
"welcomeToBooleans();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c443eddfaeb5bdef",
"name": "Waypoint: Declare JavaScript Variables",
"dashedName": "waypoint-declare-javascript-variables",
"title": "Declare JavaScript Variables",
"difficulty": "9.9801",
"description": [
"Now, use the <code>var</code> keyword to create a <code>variable</code> called <code>myName</code>. Set its value to your name.",
"<code>Variables</code> 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 <code>camel case</code>. An example of camel case is: camelCase.",
"Look at the <code>ourName</code> example if you get stuck."
],
@ -78,12 +76,12 @@
"",
"if(typeof(myName) !== 'undefined'){(function(v){return(v);})(myName);}"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c444eddfaeb5bdef",
"name": "Waypoint: Declare String Variables",
"dashedName": "waypoint-declare-string-variables",
"title": "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",
@ -105,12 +103,12 @@
"// We'll learn about functions soon.",
"if(typeof(myFirstName) !== 'undefined' && typeof(myLastName) !== 'undefined'){(function(y,z){return(y + ', ' + z);})(myFirstName, myLastName);}"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c448eddfaeb5bdef",
"name": "Waypoint: Check the Length Property of a String Variable",
"dashedName": "waypoint-check-the-length-property-of-a-string-variable",
"title": "Check the Length Property of a String Variable",
"difficulty": "9.9809",
"description": [
"Use the <code>.length</code> property to count the number of characters in the <code>lastNameLength</code> variable.",
@ -138,12 +136,12 @@
"// We'll learn about functions soon.",
"if(typeof(lastNameLength) != 'undefined'){(function(v){return(v);})(lastNameLength);}"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c549eddfaeb5bdef",
"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",
"title": "Use Bracket Notation to Find the First Character in a String",
"difficulty": "9.9810",
"description": [
"Use <code>bracket notation</code> to find the first character in a the <code>firstLetterOfLastName</code> variable.",
@ -173,12 +171,12 @@
"// We'll learn about functions soon.",
"(function(v){return(v);})(firstLetterOfLastName);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c450eddfaeb5bdef",
"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",
"title": "Use Bracket Notation to Find the Nth Character in a String",
"difficulty": "9.9811",
"description": [
"Just like the last lesson where we used <code>Bracket Notation</code>to access the first letter we can use the same method to get the letters ar other positions",
@ -204,12 +202,12 @@
"// We'll learn about functions soon.",
"(function(v){return(v);})(thirdLetterOfLastName);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c451eddfaeb5bdef",
"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",
"title": "Use Bracket Notation to Find the Last Character in a String",
"difficulty": "9.9812",
"description": [
"Use <code>bracket notation</code> to find the last character in the <code>lastName</code> variable.",
@ -234,12 +232,12 @@
"",
"(function(v){return(v);})(lastLetterOfLastName);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7123c9c452eddfaeb5bdef",
"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",
"title": "Use Bracket Notation to Find the Nth-to-Last Character in a String",
"difficulty": "9.9813",
"description": [
"Use <code>bracket notation</code> to find the second-to-last character in the <code>lastName</code> variable.",
@ -264,17 +262,17 @@
"",
"(function(v){return(v);})(secondToLastLetterOfLastName);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "cf1111c1c11feddfaeb3bdef",
"name": "Waypoint: Add Two Numbers with JavaScript",
"dashedName": "waypoint-add-two-numbers-with-javascript",
"title": "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 <code>+</code>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 <code>+</code>for addition.",
"Replace the <code>0</code>with correct number to achieve the result in the comment."
],
"tests": [
@ -287,17 +285,17 @@
"",
"(function(z){return('add='+z);})(add);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "cf1111c1c11feddfaeb4bdef",
"name": "Waypoint: Subtract One Number from Another with JavaScript",
"dashedName": "waypoint-subtract-one-number-from-another-with-javascript",
"title": "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 <code>-</code>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 <code>-</code>for subtraction.",
"Replace the <code>0</code>with correct number to achieve the result in the comment."
],
"tests": [
@ -310,17 +308,17 @@
"",
"(function(z){return('subtract='+z);})(subtract);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "cf1231c1c11feddfaeb5bdef",
"name": "Waypoint: Multiply Two Numbers with JavaScript",
"dashedName": "waypoint-multiply-two-numbers-with-javascript",
"title": "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 <code>*</code>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 <code>*</code>for multiplication.",
"Replace the <code>0</code>with correct number to achieve the result in the comment."
],
"tests": [
@ -333,17 +331,17 @@
"",
"(function(z){return('multiply='+z);})(multiply);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "cf1111c1c11feddfaeb6bdef",
"name": "Waypoint: Divide One Number by Another with JavaScript",
"dashedName": "waypoint-divide-one-number-by-another-with-javascript",
"title": "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 <code>/</code>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 <code>/</code>for division.",
"Replace the <code>0</code>with correct number to achieve the result in the comment."
],
"tests": [
@ -356,15 +354,15 @@
"",
"(function(z){return('divide='+z);})(divide);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "cf1391c1c11feddfaeb4bdef",
"name": "Waypoint: Create Decimal Numbers with JavaScript",
"dashedName": "waypoint-create-decimal-numbers-with-javascript",
"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 <code>myDecimal</code> and give it a decimal value."
],
"tests": [
@ -379,15 +377,15 @@
"",
"(function(){if(typeof(myDecimal) != 'undefined'){return(myDecimal);}})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7993c9c69feddfaeb7bdef",
"name": "Waypoint: Perform Arithmetic Operations on Decimals with JavaScript",
"dashedName": "waypoint-perform-arithmetic-operations-on-decimals-with-javascript",
"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');",
@ -401,12 +399,12 @@
"",
"(function(y,z){return('multiply='+y+', divide='+z);})(multiply,divide);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bd7993c9c69feddfaeb8bdef",
"name": "Waypoint: Store Multiple Values in one Variable using JavaScript Arrays",
"dashedName": "waypoint-store-multiple-values-in-one-variable-using-javascript-arrays",
"title": "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",
@ -428,12 +426,12 @@
"",
"(function(z){return(z);})(myArray);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c11feddfaeb7bdef",
"name": "Waypoint: Nest one Array within Another Array",
"dashedName": "waypoint-nest-one-array-within-another-array",
"title": "Nest one Array within Another Array",
"difficulty":"9.98161",
"description":[
"We are also able to create arrays within arrays. This technique is called <code>nesting</code>.",
@ -448,12 +446,12 @@
"",
"if(typeof(myArray) !== 'undefined'){(function(){return(myArray);})();}"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"bg9997c9c79feddfaeb9bdef",
"name": "Waypoint: Access Array Data with Indexes",
"dashedName": "waypoint-access-array-data-with-indexes",
"title": "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",
@ -479,12 +477,12 @@
"",
"if(typeof(myArray) != 'undefined' && typeof(data) != 'undefined'){(function(y,z){return('myArray = ' + JSON.stringify(y) + ', data = ' + JSON.stringify(z));})(myArray, data);}"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c11feddfaeb8bdef",
"name": "Waypoint: Modify Array Data With Indexes",
"dashedName": "waypoint-modify-array-data-with-indexes",
"title": "Modify Array Data With Indexes",
"difficulty":"9.98171",
"description":[
"We are able to modify the data stored in an array by using indexes",
@ -511,12 +509,12 @@
"",
"if(typeof(myArray) != 'undefined'){(function(){return(myArray);})();}"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bg9994c9c69feddfaeb9bdef",
"name": "Waypoint: Manipulate Arrays With pop()",
"dashedName": "waypoint-manipulate-arrays-with-pop",
"title": "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",
@ -542,12 +540,12 @@
"",
"(function(y, z){return('myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z));})(myArray, removed);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bg9995c9c69feddfaeb9bdef",
"name": "Waypoint: Manipulate Arrays With push()",
"dashedName": "waypoint-manipulate-arrays-with-push",
"title": "Manipulate Arrays With push()",
"difficulty": "9.9818",
"description": [
"Now that we've learned how to <code>pop</code>things from the end of the array, we need to learn how to <code>push</code>stuff back to the end",
@ -564,12 +562,12 @@
"",
"(function(z){return('myArray = ' + JSON.stringify(z));})(myArray);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bg9996c9c69feddfaeb9bdef",
"name": "Waypoint: Manipulate Arrays With shift()",
"dashedName": "waypoint-manipulate-arrays-with-shift",
"title": "Manipulate Arrays With shift()",
"difficulty": "9.9817",
"description": [
"Another common way in which we can manipulate the data in an array is through <code>.shift() </code>",
@ -587,12 +585,12 @@
"",
"(function(y, z){return('myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z));})(myArray, removed);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id": "bg9997c9c69feddfaeb9bdef",
"name": "Waypoint: Manipulate Arrays With unshift()",
"dashedName": "waypoint-manipulate-arrays-with-unshift",
"title": "Manipulate Arrays With unshift()",
"difficulty": "9.9818",
"description": [
"Now that we've learned how to <code>shift</code>things from the start of the array, we need to learn how to <code>unshift</code>stuff back to the start",
@ -609,12 +607,12 @@
"",
"(function(y, z){return('myArray = ' + JSON.stringify(y));})(myArray);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"bg9997c9c89feddfaeb9bdef",
"name": "Waypoint: Write Reusable JavaScript with Functions",
"dashedName": "waypoint-write-reusable-javascript-with-functions",
"title": "Write Reusable JavaScript with Functions",
"difficulty":"9.9819",
"description":[
"In JavaScript we can divide up our code into separate and reusable parts called functions",
@ -646,12 +644,12 @@
"(function(){return(f);})();",
"}"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"bg9998c9c99feddfaeb9bdef",
"name": "Waypoint: Build JavaScript Objects",
"dashedName": "waypoint-build-javascript-objects",
"title": "Build JavaScript Objects",
"difficulty":"9.9822",
"description":[
"A very important data type in javascript is the <code>Object</code>",
@ -667,7 +665,6 @@
"</code>",
"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 an Object that represents a dog called myDog!"
],
"tests":[
"assert((function(z){if(z.hasOwnProperty('name') && z.name != undefined && typeof(z.name) == 'string'){return(true);}else{return(false);}})(myDog), 'myDog should contain the property name and it should be a string');",
@ -692,12 +689,12 @@
"",
"(function(z){return(z);})(myDog);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"bg9999c9c99feddfaeb9bdef",
"name": "Waypoint: Manipulate JavaScript Objects",
"dashedName": "waypoint-manipulate-javascript-objects",
"title": "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",
@ -737,12 +734,12 @@
"",
"(function(z){return(z);})(myDog);"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c11feddfaeb5bdef",
"name": "Waypoint: Iterate with JavaScript For Loops",
"dashedName": "waypoint-iterate-with-javascript-for-loops",
"title": "Iterate with JavaScript For Loops",
"difficulty":"9.9824",
"description":[
"Loops are a critical part of any program! The next few challenges",
@ -766,12 +763,12 @@
"",
""
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c11feddfaeb1bdef",
"name": "Waypoint: Iterate with JavaScript While Loops",
"dashedName": "waypoint-iterate-with-javascript-while-loops",
"title": "Iterate with JavaScript While Loops",
"difficulty":"9.9825",
"description":[
"Loops are a critical part of any program! The next few challenges",
@ -796,12 +793,12 @@
"",
""
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c11feddfaeb2bdef",
"name": "Waypoint: Iterate with JavaScript Do-While Loops",
"dashedName": "waypoint-iterate-with-javascript-do-while-loops",
"title": "Iterate with JavaScript Do-While Loops",
"difficulty":"9.9826",
"description":[
"Let's now take a look at the do - while loop",
@ -826,12 +823,12 @@
"",
""
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c11feddfaeb9bdef",
"name": "Waypoint: Generate Random Fractions with JavaScript",
"dashedName": "waypoint-generate-random-fractions-with-javascript",
"title": "Generate Random Fractions with JavaScript",
"difficulty":"9.9827",
"description":[
"Random numbers are very useful for creating random behaviours and games",
@ -852,12 +849,12 @@
"",
"(function(){return(myFunction());})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c12feddfaeb1bdef",
"name": "Waypoint: Generate Random Whole Numbers with JavaScript",
"dashedName": "waypoint-generate-random-whole-numbers-with-javascript",
"title": "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",
@ -881,12 +878,12 @@
"",
"(function(){return(myFunction());})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c12feddfaeb2bdef",
"name": "Waypoint: Generate Random Whole Numbers within a Range",
"dashedName": "waypoint-generate-random-whole-numbers-within-a-range",
"title": "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.",
@ -909,12 +906,12 @@
"",
"(function(){return(myFunction());})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c12feddfaeb3bdef",
"name": "Waypoint: Use Conditional Logic with If-Else Statements",
"dashedName": "waypoint-use-conditional-logic-with-if-else-statements",
"title": "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",
@ -943,12 +940,12 @@
"",
"(function(){return(myFunction());})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c12feddfaeb6bdef",
"name": "Waypoint: Sift through Text with Regular Expressions",
"dashedName": "waypoint-sift-through-text-with-regular-expressions",
"title": "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",
@ -979,12 +976,12 @@
" return(testString.match(expression).length);",
"})();(function(){return(test);})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c12feddfaeb7bdef",
"name": "Waypoint: Find Numbers with Regular Expressions",
"dashedName": "waypoint-find-numbers-with-regular-expressions",
"title": "Find Numbers with Regular Expressions",
"difficulty":"9.985",
"description":[
"We can use special selectors in RegEx to select a particular type of value",
@ -1009,12 +1006,12 @@
" return(testString.match(expression).length);",
"})();(function(){return(test);})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c12feddfaeb8bdef",
"name": "Waypoint: Find White Space with Regular Expressions",
"dashedName": "waypoint-find-white-space-with-regular-expressions",
"title": "Find White Space with Regular Expressions",
"difficulty":"9.986",
"description":[
"We can also use selectors like <code>\\s</code> to find spaces in a string",
@ -1038,12 +1035,12 @@
" return(testString.match(expression).length);",
"})();(function(){return(test);})();"
],
"type": "waypoint",
"challengeType": 1
},
{
"id":"cf1111c1c13feddfaeb3bdef",
"name": "Waypoint: Invert Regular Expression Matches with JavaScript",
"dashedName": "waypoint-invert-regular-expression-matches-with-javaScript",
"title": "Invert Regular Expression Matches with JavaScript",
"difficulty":"9.987",
"description":[
"Use <code>/\\S/gi;</code> to match everything that isn't a space in the string",
@ -1066,12 +1063,12 @@
" return(testString.match(expression).length);",
"})();(function(){return(test);})();"
],
"type": "waypoint",
"challengeType":1
},
{
"id":"cf1111c1c12feddfaeb9bdef",
"name": "Waypoint: Create a JavaScript Slot Machine",
"dashedName": "waypoint-create-a-javascript-slot-machine",
"title": "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",
@ -1220,12 +1217,12 @@
" }",
"</style>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id":"cf1111c1c13feddfaeb1bdef",
"name": "Waypoint: Add your JavaScript Slot Machine Slots",
"dashedName": "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",
@ -1379,12 +1376,12 @@
" }",
"</style>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id":"cf1111c1c13feddfaeb2bdef",
"name": "Waypoint: Bring your JavaScript Slot Machine to Life",
"dashedName": "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",
@ -1546,6 +1543,7 @@
" }",
"</style>"
],
"type": "waypoint",
"challengeType": 0
}
]

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7158d8c442eddfbeb5bd1f",
"name": "Waypoint: Get Set for Ziplines",
"dashedName": "waypoint-get-set-for-ziplines",
"title": "Get Set for Ziplines",
"difficulty": 1.00,
"challengeSeed": ["125658022"],
"description": [
@ -24,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": "",
@ -39,8 +39,7 @@
},
{
"id": "bd7158d8c242eddfaeb5bd13",
"name": "Zipline: Build a Personal Portfolio Webpage",
"dashedName": "zipline-build-a-personal-portfolio-webpage",
"title": "Build a Personal Portfolio Webpage",
"difficulty": 1.01,
"challengeSeed": ["133315782"],
"description": [
@ -60,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -75,8 +75,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd13",
"name": "Zipline: Build a Random Quote Machine",
"dashedName": "zipline-build-a-random-quote-machine",
"title": "Build a Random Quote Machine",
"difficulty": 1.02,
"challengeSeed": ["126415122"],
"description": [
@ -92,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -107,8 +107,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd10",
"name": "Zipline: Show the Local Weather",
"dashedName": "zipline-show-the-local-weather",
"title": "Show the Local Weather",
"difficulty": 1.03,
"challengeSeed": ["126415127"],
"description": [
@ -125,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -140,8 +140,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd0f",
"name": "Zipline: Build a Pomodoro Clock",
"dashedName": "zipline-build-a-pomodoro-clock",
"title": "Build a Pomodoro Clock",
"difficulty": 1.04,
"challengeSeed": ["126411567"],
"description": [
@ -157,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -172,8 +172,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd1f",
"name": "Zipline: Use the Twitch.tv JSON API",
"dashedName": "zipline-use-the-twitchtv-json-api",
"title": "Use the Twitch.tv JSON API",
"difficulty": 1.05,
"challengeSeed": ["126411564"],
"description": [
@ -193,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bad87fee1348bd9acde08712",
"name": "Waypoint: Use Responsive Design with Bootstrap Fluid Containers",
"dashedName": "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.",
@ -15,7 +14,7 @@
"To get started, we should nest all of our HTML in a <code>div</code> element with the class \"container-fluid\"."
],
"tests": [
"assert($('div').hasClass('container-fluid'), 'Your <code>div</code> element should have the class \"row\"')",
"assert($('div').hasClass('container-fluid'), 'Your <code>div</code> element should have the class \"container-fluid\"')",
"assert(editor.match(/<\\/div>/g) && editor.match(/<div/g) && editor.match(/<\\/div>/g).length === editor.match(/<div/g).length, 'Make sure each of your <code>div</code> elements has a closing tag.')"
],
"challengeSeed": [
@ -74,6 +73,7 @@
" <button type='submit'>Submit</button>",
"</form>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -88,8 +88,7 @@
},
{
"id": "bad87fee1348bd9acde08812",
"name": "Waypoint: Make Images Mobile Responsive",
"dashedName": "waypoint-make-images-mobile-responsive",
"title": "Make Images Mobile Responsive",
"difficulty": 2.02,
"description": [
"First, Add a new image with the <code>src</code> attribute of \"http://bit.ly/fcc-kittens2\".",
@ -159,6 +158,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -173,8 +173,7 @@
},
{
"id": "bad87fee1348bd8acde08812",
"name": "Waypoint: Center Text with Bootstrap",
"dashedName": "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 <code>text-center</code> to our <code>h1</code> and <code>h2</code> elements.",
@ -242,6 +241,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -256,8 +256,7 @@
},
{
"id": "bad87fee1348cd8acdf08812",
"name": "Waypoint: Create a Bootstrap Button",
"dashedName": "waypoint-create-a-bootstrap-button",
"title": "Create a Bootstrap Button",
"difficulty": 2.04,
"description": [
"Bootstrap has its own styles for <code>button</code> elements, which look much better than the plain HTML ones.",
@ -327,6 +326,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -341,8 +341,7 @@
},
{
"id": "bad87fee1348cd8acef08812",
"name": "Waypoint: Create a Block Element Bootstrap Button",
"dashedName": "waypoint-create-a-block-element-bootstrap-button",
"title": "Create a Block Element Bootstrap Button",
"difficulty": 2.05,
"description": [
"Normally, your <code>button</code> 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.",
@ -416,6 +415,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -430,8 +430,7 @@
},
{
"id": "bad87fee1348cd8acef08811",
"name": "Waypoint: Taste the Bootstrap Button Color Rainbow",
"dashedName": "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.",
@ -503,6 +502,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -517,8 +517,7 @@
},
{
"id": "bad87fee1348cd8acef08813",
"name": "Waypoint: Call out Optional Actions with Button Info",
"dashedName": "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.",
@ -591,6 +590,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -605,8 +605,7 @@
},
{
"id": "bad87fee1348ce8acef08814",
"name": "Waypoint: Warn your Users of a Dangerous Action",
"dashedName": "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.",
@ -680,6 +679,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -694,8 +694,7 @@
},
{
"id": "bad88fee1348ce8acef08815",
"name": "Waypoint: Use the Bootstrap Grid to Put Elements Side By Side",
"dashedName": "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 <code>div</code> element.",
@ -774,6 +773,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -788,8 +788,7 @@
},
{
"id": "bad87fee1348bd9aedf08845",
"name": "Waypoint: Ditch Custom CSS for Bootstrap",
"dashedName": "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.",
@ -873,6 +872,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -887,8 +887,7 @@
},
{
"id": "bad87fee1348bd9aede08845",
"name": "Waypoint: Create a Custom Heading",
"dashedName": "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.",
@ -962,6 +961,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -976,8 +976,7 @@
},
{
"id": "bad87fee1348bd9aedd08845",
"name": "Waypoint: Add Font Awesome Icons to our Buttons",
"dashedName": "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.",
@ -1047,6 +1046,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1061,8 +1061,7 @@
},
{
"id": "bad87fee1348bd9aedc08845",
"name": "Waypoint: Add Font Awesome Icons to all of our Buttons",
"dashedName": "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.",
@ -1132,6 +1131,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1146,8 +1146,7 @@
},
{
"id": "bad87fee1348bd9aedb08845",
"name": "Waypoint: Responsively Style Radio Buttons",
"dashedName": "waypoint-responsively-style-radio-buttons",
"title": "Responsively Style Radio Buttons",
"difficulty": 2.14,
"description": [
"You can use Bootstrap's \"col-xs-*\" classes on <code>form</code> elements, too! This way, our radio buttons will be evenly spread out across the page, regardless of how wide the screen resolution is.",
@ -1217,6 +1216,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1231,8 +1231,7 @@
},
{
"id": "bad87fee1348bd9aeda08845",
"name": "Waypoint: Responsively Style Checkboxes",
"dashedName": "waypoint-responsively-style-checkboxes",
"title": "Responsively Style Checkboxes",
"difficulty": 2.15,
"description": [
"You can use Bootstrap's \"col-xs-*\" classes on <code>form</code> elements, too! This way, our checkboxes will be evenly spread out across the page, regardless of how wide the screen resolution is.",
@ -1309,6 +1308,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1323,8 +1323,7 @@
},
{
"id": "bad87fee1348bd9aed908845",
"name": "Waypoint: Style Text Inputs as Form Controls",
"dashedName": "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 <code>&#60;i class=\"fa fa-paper-plane\"&#62;&#60;/i&#62;</code> within your submit <code>button</code> element.",
@ -1410,6 +1409,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1424,8 +1424,7 @@
},
{
"id": "bad87fee1348bd9aec908845",
"name": "Waypoint: Line up Form Elements Responsively with Bootstrap",
"dashedName": "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 <code>input</code> and your submission <code>button</code> on the same line. We'll do this the same way we have previously: by using a <code>div</code> element with the class \"row\", and other <code>div</code> elements within it using the \"col-xs-*\" class.",
@ -1433,9 +1432,9 @@
"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 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(/<div/g) && editor.match(/<\\/div>/g).length === editor.match(/<div/g).length, 'Make sure each of your <code>div</code> elements has a closing tag.')"
],
"challengeSeed": [
@ -1512,6 +1511,7 @@
" </form>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1526,8 +1526,7 @@
},
{
"id": "bad87fee1348bd9aec908846",
"name": "Waypoint: Create a Bootstrap Headline",
"dashedName": "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.",
@ -1547,6 +1546,7 @@
"",
""
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1561,8 +1561,7 @@
},
{
"id": "bad87fee1348bd9aec908746",
"name": "Waypoint: House our page within a Bootstrap Container Fluid Div",
"dashedName": "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.",
@ -1577,6 +1576,7 @@
"",
""
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1591,8 +1591,7 @@
},
{
"id": "bad87fee1348bd9bec908846",
"name": "Waypoint: Create a Bootstrap Row",
"dashedName": "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.",
@ -1610,6 +1609,7 @@
"",
""
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1624,8 +1624,7 @@
},
{
"id": "bad87fee1348bd9aec908847",
"name": "Waypoint: Split your Bootstrap Row",
"dashedName": "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.",
@ -1642,6 +1641,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1656,8 +1656,7 @@
},
{
"id": "bad87fee1348bd9aec908848",
"name": "Waypoint: Create Bootstrap Wells",
"dashedName": "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.",
@ -1680,6 +1679,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1694,8 +1694,7 @@
},
{
"id": "bad87fee1348bd9aec908849",
"name": "Waypoint: Add Elements within your Bootstrap Wells",
"dashedName": "waypoint-add-elements-within-your-bootstrap-wells",
"title": "Add Elements within your Bootstrap Wells",
"difficulty": 2.22,
"description": [
"Now we're several <code>div</code> elements deep on each column of our row. This is as deep as we'll need to go. Now we can add our <code>button</code> elements.",
@ -1720,6 +1719,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1734,8 +1734,7 @@
},
{
"id": "bad87fee1348bd9aec908850",
"name": "Waypoint: Apply the Default Bootstrap Button Style",
"dashedName": "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\"",
@ -1766,6 +1765,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1780,8 +1780,7 @@
},
{
"id": "bad87fee1348bd9aec908852",
"name": "Waypoint: Create a Class to Target with jQuery Selectors",
"dashedName": "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.",
@ -1811,6 +1810,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1825,8 +1825,7 @@
},
{
"id": "bad87fee1348bd9aec908853",
"name": "Waypoint: Add ID Attributes to Bootstrap Elements",
"dashedName": "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.",
@ -1860,6 +1859,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1874,8 +1874,7 @@
},
{
"id": "bad87fee1348bd9aec908854",
"name": "Waypoint: Label Bootstrap Wells",
"dashedName": "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.",
@ -1908,6 +1907,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1922,8 +1922,7 @@
},
{
"id": "bad87fee1348bd9aec908855",
"name": "Waypoint: Give Each Element a Unique ID",
"dashedName": "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.",
@ -1960,6 +1959,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -1974,8 +1974,7 @@
},
{
"id": "bad87fee1348bd9aec908856",
"name": "Waypoint: Label Bootstrap Buttons",
"dashedName": "waypoint-label-bootstrap-buttons",
"title": "Label Bootstrap Buttons",
"difficulty": 2.28,
"description": [
"Just like we labled our wells, we want to label our buttons.",
@ -2012,6 +2011,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],
@ -2026,8 +2026,7 @@
},
{
"id": "bad87fee1348bd9aec908857",
"name": "Waypoint: Use Comments to Clarify Code",
"dashedName": "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.",
@ -2063,6 +2062,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0,
"nameCn": "",
"descriptionCn": [],

View File

@ -0,0 +1,304 @@
{
"name": "Expert Algorithm Scripting",
"order": 0.013,
"challenges": [
{
"id": "aff0395860f5d3034dc0bfc9",
"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 <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>RSAP</a> 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": "a3f503de51cf954ede28891d",
"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 <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>RSAP</a> 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"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
"nameFr": "",
"descriptionFr": [],
"nameRu": "",
"descriptionRu": [],
"nameEs": "",
"descriptionEs": [],
"namePt": "",
"descriptionPt": []
},
{
"id": "aa2e6f85cab2ab736c9a9b24",
"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 <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>RSAP</a> 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": "a56138aff60341a09ed6c480",
"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 <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>RSAP</a> 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": "a7bf700cd123b9a54eef01d5",
"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 <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>RSAP</a> 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": "a19f0fbe1872186acd434d5a",
"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 <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>RSAP</a> 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": []
}
]
}

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7353d8c341eddeaeb5bd0f",
"name": "Waypoint: Save your Code Revisions Forever with Git",
"dashedName": "waypoint-save-your-code-revisions-forever-with-git",
"title": "Save your Code Revisions Forever with Git",
"difficulty": 0.01,
"challengeSeed": ["133316034"],
"description": [
@ -35,6 +34,7 @@
"Complete \"Merge Tada!\"",
"Once you've completed these steps, move on to our next challenge."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7128d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 1: The 4 Basic Parts of a Computer",
"dashedName": "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"
@ -25,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"],
@ -44,8 +44,7 @@
},
{
"id": "bd7127d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 2: More Computer Hardware",
"dashedName": "hike-computer-basics-2-more-computer-hardware",
"title": "Computer Basics 2: More Computer Hardware",
"difficulty": 9.02,
"challengeSeed": [
"132542458"
@ -64,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!"],
@ -83,8 +83,7 @@
},
{
"id": "bd7126d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 3: Intro to Binary Code",
"dashedName": "hike-computer-basics-3-intro-to-binary-code",
"title": "Computer Basics 3: Intro to Binary Code",
"difficulty": 9.03,
"challengeSeed": [
"132542757"
@ -98,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],
@ -117,8 +117,7 @@
},
{
"id": "bd7125d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 4: Decoding a Binary Number",
"dashedName": "hike-computer-basics-4-decoding-a-binary-number",
"title": "Computer Basics 4: Decoding a Binary Number",
"difficulty": 9.04,
"challengeSeed": [
"132543332"
@ -134,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],
@ -153,8 +153,7 @@
},
{
"id": "bd7124d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 5: How To Measure Data Size",
"dashedName": "hike-computer-basics-5-how-to-measure-data-size",
"title": "Computer Basics 5: How To Measure Data Size",
"difficulty": 9.05,
"challengeSeed": [
"132543959"
@ -173,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."],
@ -192,8 +192,7 @@
},
{
"id": "bd7123d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 6: Measuring Data Speed",
"dashedName": "hike-computer-basics-6-measuring-data-speed",
"title": "Computer Basics 6: Measuring Data Speed",
"difficulty": 9.06,
"challengeSeed": [
"132545171"
@ -211,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],
@ -229,8 +229,7 @@
},
{
"id": "bd7122d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 7: Binary Bytes",
"dashedName": "hike-computer-basics-7-binary-bytes",
"title": "Computer Basics 7: Binary Bytes",
"difficulty": 9.07,
"challengeSeed": [
"132545417"
@ -244,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],
@ -263,8 +263,7 @@
},
{
"id": "bd7121d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 8: Types of Computers",
"dashedName": "hike-computer-basics-8-types-of-computers",
"title": "Computer Basics 8: Types of Computers",
"difficulty": 9.08,
"challengeSeed": [
"132546182"
@ -283,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],
@ -302,8 +302,7 @@
},
{
"id": "bd7120d8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 9: More on the Motherboard",
"dashedName": "hike-computer-basics-9-more-on-the-motherboard",
"title": "Computer Basics 9: More on the Motherboard",
"difficulty": 9.09,
"challengeSeed": [
"132547285"
@ -324,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."],
@ -343,8 +343,7 @@
},
{
"id": "bd712fd8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 10: Data Networks",
"dashedName": "hike-computer-basics-10-data-networks",
"title": "Computer Basics 10: Data Networks",
"difficulty": 9.10,
"challengeSeed": [
"132547590"
@ -364,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."],
@ -383,8 +383,7 @@
},
{
"id": "bd712ed8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 11: IP Addresses",
"dashedName": "hike-computer-basics-11-ip-addresses",
"title": "Computer Basics 11: IP Addresses",
"difficulty": 9.11,
"challengeSeed": [
"132548071"
@ -404,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],
@ -422,8 +422,7 @@
},
{
"id": "bd712dd8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 12: How the Internet Works",
"dashedName": "hike-computer-basics-12-how-the-internet-works",
"title": "Computer Basics 12: How the Internet Works",
"difficulty": 9.12,
"challengeSeed": [
"132548579"
@ -443,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],
@ -461,8 +461,7 @@
},
{
"id": "bd712cd8c441eddfbeb5bddf",
"name": "Hike: Computer Basics 13: Software",
"dashedName": "hike-computer-basics-13-software",
"title": "Computer Basics 13: Software",
"difficulty": 9.13,
"challengeSeed": [
"132548908"
@ -477,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]
@ -494,8 +494,7 @@
},
{
"id": "bd712bd8c441eddfbeb5bddf",
"name": "Hike: What Do Programmers Do?",
"dashedName": "hike-what-do-programmers-do",
"title": "What Do Programmers Do?",
"difficulty": 9.14,
"challengeSeed": [
"133166912"
@ -512,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],
@ -531,8 +531,7 @@
},
{
"id": "bd712ad8c441eddfbeb5bddf",
"name": "Hike: Console and Logging",
"dashedName": "hike-console-and-logging",
"title": "Console and Logging",
"difficulty": 9.15,
"challengeSeed": [
"133170880"
@ -550,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."],
@ -568,8 +568,7 @@
},
{
"id": "bd7119d8c441eddfbeb5bddf",
"name": "Hike: Variables In Code",
"dashedName": "hike-variables-in-code",
"title": "Variables In Code",
"difficulty": 9.16,
"challengeSeed": [
"133172920"
@ -583,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],
@ -601,8 +601,7 @@
},
{
"id": "bd7029d8c441eddfbeb5bddf",
"name": "Hike: Source Code",
"dashedName": "hike-source-code",
"title": "Source Code",
"difficulty": 9.17,
"challengeSeed": [
"133177129"
@ -627,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],
@ -646,8 +646,7 @@
},
{
"id": "bd7129d8b441eddfbeb5bddf",
"name": "Hike: Routers and Packets",
"dashedName": "hike-routers-and-packets",
"title": "Routers and Packets",
"difficulty": 9.18,
"challengeSeed": [
"133181251"
@ -678,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."],
@ -697,8 +697,7 @@
},
{
"id": "bd7129d8a441eddfbeb5bddf",
"name": "Hike: Hardware: Chips and Moore's Law",
"dashedName": "hike-chips-and-moores-law",
"title": "Hardware: Chips and Moore's Law",
"difficulty": 9.19,
"challengeSeed": [
"133182057"
@ -715,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],
@ -734,8 +734,7 @@
},
{
"id": "bd7129d80441eddfbeb5bddf",
"name": "Hike: Analog vs Digital and File Compression",
"dashedName": "hike-analog-vs-digital-and-file-compression",
"title": "Analog vs Digital and File Compression",
"difficulty": 9.20,
"challengeSeed": [
"133182587"
@ -755,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],
@ -773,8 +773,7 @@
},
{
"id": "bd7129d89441eddfbeb5bddf",
"name": "Hike: Computer Security",
"dashedName": "hike-computer-security",
"title": "Computer Security",
"difficulty": 9.21,
"challengeSeed": [
"133186284"
@ -808,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"],

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "a3566b1109230028080c9345",
"name": "Bonfire: Sum All Numbers in a Range",
"dashedName": "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.",
@ -31,6 +30,7 @@
"Math.min()",
"Array.reduce()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -45,8 +45,7 @@
},
{
"id": "a5de63ebea8dbee56860f4f2",
"name": "Bonfire: Diff Two Arrays",
"dashedName": "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.",
@ -77,6 +76,7 @@
"Array.indexOf()",
"String.concat()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -91,8 +91,7 @@
},
{
"id": "a7f4d8f2483413a6ce226cac",
"name": "Bonfire: Roman Numeral Converter",
"dashedName": "bonfire-roman-numeral-converter",
"title": "Roman Numeral Converter",
"tests": [
"expect(convert(12)).to.equal(\"XII\");",
"expect(convert(5)).to.equal(\"V\");",
@ -118,6 +117,7 @@
"Array.indexOf()",
"Array.join()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -132,8 +132,7 @@
},
{
"id": "a0b5010f579e69b815e7c5d6",
"name": "Bonfire: Search and Replace",
"dashedName": "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\");",
@ -162,6 +161,7 @@
"String.replace()",
"Array.join()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -176,8 +176,7 @@
},
{
"id": "aa7697ea2477d1316795783b",
"name": "Bonfire: Pig Latin",
"dashedName": "bonfire-pig-latin",
"title": "Pig Latin",
"tests": [
"expect(translate(\"california\")).to.equal(\"aliforniacay\");",
"expect(translate(\"paragraphs\")).to.equal(\"aragraphspay\");",
@ -206,6 +205,7 @@
"String.substr()",
"String.split()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -220,8 +220,7 @@
},
{
"id": "afd15382cdfb22c9efe8b7de",
"name": "Bonfire: DNA Pairing",
"dashedName": "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');",
@ -245,6 +244,7 @@
"Array.push()",
"String.split()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -259,8 +259,7 @@
},
{
"id": "af7588ade1100bde429baf20",
"name": "Bonfire: Missing letters",
"dashedName": "bonfire-missing-letters",
"title": "Missing letters",
"difficulty": "2.05",
"description": [
"Find the missing letter in the passed letter range and return it.",
@ -284,6 +283,7 @@
"String.charCodeAt()",
"String.fromCharCode()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -298,8 +298,7 @@
},
{
"id": "a77dbc43c33f39daa4429b4f",
"name": "Bonfire: Boo who",
"dashedName": "bonfire-boo-who",
"title": "Boo who",
"difficulty": "2.06",
"description": [
"Check if a value is classified as a boolean primitive. Return true or false.",
@ -327,6 +326,7 @@
"MDNlinks": [
"Boolean Objects"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -341,8 +341,7 @@
},
{
"id": "a105e963526e7de52b219be9",
"name": "Bonfire: Sorted Union",
"dashedName": "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.",
@ -368,6 +367,7 @@
"Arguments object",
"Array.reduce()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -382,8 +382,7 @@
},
{
"id": "a6b0bb188d873cb2c8729495",
"name": "Bonfire: Convert HTML Entities",
"dashedName": "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.",
@ -410,6 +409,7 @@
"RegExp",
"HTML Entities"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -424,8 +424,7 @@
},
{
"id": "a103376db3ba46b2d50db289",
"name": "Bonfire: Spinal Tap Case",
"dashedName": "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.",
@ -450,6 +449,7 @@
"RegExp",
"String.replace()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -464,8 +464,7 @@
},
{
"id": "a5229172f011153519423690",
"name": "Bonfire: Sum All Odd Fibonacci Numbers",
"dashedName": "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.",
@ -491,6 +490,7 @@
"MDNlinks": [
"Remainder"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -505,8 +505,7 @@
},
{
"id": "a3bfc1673c0526e06d3ac698",
"name": "Bonfire: Sum All Primes",
"dashedName": "bonfire-sum-all-primes",
"title": "Sum All Primes",
"difficulty": "2.10",
"description": [
"Sum all the prime numbers up to and including the provided number.",
@ -530,6 +529,7 @@
"For Loops",
"Array.push()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -544,8 +544,7 @@
},
{
"id": "ae9defd7acaf69703ab432ea",
"name": "Bonfire: Smallest Common Multiple",
"dashedName": "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.",
@ -569,6 +568,7 @@
"MDNlinks": [
"Smallest Common Multiple"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -583,8 +583,7 @@
},
{
"id": "a6e40f1041b06c996f7b2406",
"name": "Bonfire: Finders Keepers",
"dashedName": "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).",
@ -605,6 +604,7 @@
"MDNlinks": [
"Array.some()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -619,8 +619,7 @@
},
{
"id": "a5deed1811a43193f9f1c841",
"name": "Bonfire: Drop it",
"dashedName": "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.",
@ -643,6 +642,7 @@
"Arguments object",
"Array.shift()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -657,8 +657,7 @@
},
{
"id": "ab306dbdcc907c7ddfc30830",
"name": "Bonfire: Steamroller",
"dashedName": "bonfire-steamroller",
"title": "Steamroller",
"difficulty": "2.14",
"description": [
"Flatten a nested array. You must account for varying levels of nesting.",
@ -681,6 +680,7 @@
"MDNlinks": [
"Array.isArray()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -695,8 +695,7 @@
},
{
"id": "a8d97bd4c764e91f9d2bda01",
"name": "Bonfire: Binary Agents",
"dashedName": "bonfire-binary-agents",
"title": "Binary Agents",
"difficulty": "2.15",
"description": [
"Return an English translated sentence of the passed binary string.",
@ -718,6 +717,7 @@
"String.charCodeAt()",
"String.fromCharCode()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -732,8 +732,7 @@
},
{
"id": "a10d2431ad0c6a099a4b8b52",
"name": "Bonfire: Everything Be True",
"dashedName": "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).",
@ -753,12 +752,12 @@
"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()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -773,8 +772,7 @@
},
{
"id": "a97fd23d9b809dac9921074f",
"name": "Bonfire: Arguments Optional",
"dashedName": "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.",
@ -800,6 +798,7 @@
"Global Function Object",
"Arguments object"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7158d8c442eddfaeb5bd18",
"name": "Zipline: Stylize Stories on Camper News",
"dashedName": "zipline-stylize-stories-on-camper-news",
"title": "Stylize Stories on Camper News",
"difficulty": 1.02,
"challengeSeed": ["126415129"],
"description": [
@ -23,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -38,8 +38,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd19",
"name": "Zipline: Wikipedia Viewer",
"dashedName": "zipline-wikipedia-viewer",
"title": "Wikipedia Viewer",
"difficulty": 1.03,
"challengeSeed": ["126415131"],
"description": [
@ -56,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -71,8 +71,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd17",
"name": "Zipline: Build a JavaScript Calculator",
"dashedName": "zipline-build-a-javascript-calculator",
"title": "Build a JavaScript Calculator",
"difficulty": 1.05,
"challengeSeed": ["126411565"],
"description": [
@ -88,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -103,8 +103,7 @@
},
{
"id": "bd7158d8c442eedfaeb5bd1c",
"name": "Zipline: Build a Tic Tac Toe Game",
"dashedName": "zipline-build-a-tic-tac-toe-game",
"title": "Build a Tic Tac Toe Game",
"difficulty": 1.06,
"challengeSeed": ["126415123"],
"description": [
@ -121,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",
@ -136,8 +136,7 @@
},
{
"id": "bd7158d8c442eddfaeb5bd1c",
"name": "Zipline: Build a Simon Game",
"dashedName": "zipline-build-a-simon-game",
"title": "Build a Simon Game",
"difficulty": 1.07,
"challengeSeed": ["126415123"],
"description": [
@ -160,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.<br><br><a class='btn btn-primary btn-block' href='https://twitter.com/intent/tweet?text=Check%20out%20the%20project%20I%20just%20built%20with%20%40FreeCodeCamp:%20%0A%20%23LearnToCode%20%23JavaScript' target='_blank'>Click here then add your link to your tweet's text</a>"
],
"type": "zipline",
"challengeType": 3,
"tests": [],
"nameCn": "",

View File

@ -1,12 +1,10 @@
{
"name": "jQuery",
"dashedName": "jquery",
"name": "jQuery",
"order": 0.004,
"challenges": [
{
"id": "bad87fee1348bd9acdd08826",
"name": "Waypoint: Learn how Script Tags and Document Ready Work",
"dashedName": "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.",
@ -44,13 +42,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9bedc08826",
"name": "Waypoint: Target HTML Elements with Selectors Using jQuery",
"dashedName": "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.",
@ -94,13 +91,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aedc08826",
"name": "Waypoint: Target Elements by Class Using jQuery",
"dashedName": "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 <code>button</code> elements bounce? We selected them with <code>$('button')</code>, then we added some CSS classes to them with <code>.addClass('animated bounce');</code>.",
@ -145,12 +141,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aeda08826",
"name": "Waypoint: Target Elements by ID Using jQuery",
"dashedName": "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.",
@ -196,13 +192,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aeda08726",
"name": "Waypoint: Delete your jQuery Functions",
"dashedName": "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.",
@ -249,12 +244,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed908626",
"name": "Waypoint: Target the same element with multiple jQuery Selectors",
"dashedName": "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 <code>$('button')</code>, by class <code>$('.btn')</code>), and by id <code>$('#target1')</code>).",
@ -300,12 +295,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed918626",
"name": "Waypoint: Remove Classes from an element with jQuery",
"dashedName": "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 <code>addClass()</code> function, you can remove them with jQuery's <code>removeClass()</code> function.",
@ -350,12 +345,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed908826",
"name": "Waypoint: Change the CSS of an Element Using jQuery",
"dashedName": "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.",
@ -404,13 +399,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed808826",
"name": "Waypoint: Disable an Element Using jQuery",
"dashedName": "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.",
@ -456,13 +450,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed708826",
"name": "Waypoint: Remove an Element Using jQuery",
"dashedName": "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.",
@ -505,13 +498,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed608826",
"name": "Waypoint: Use appendTo to Move Elements with jQuery",
"dashedName": "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 <code>div</code> to another.",
@ -558,13 +550,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed508826",
"name": "Waypoint: Clone an Element Using jQuery",
"dashedName": "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.",
@ -613,13 +604,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed308826",
"name": "Waypoint: Target the Parent of an Element Using jQuery",
"dashedName": "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.",
@ -669,13 +659,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed208826",
"name": "Waypoint: Target the Children of an Element Using jQuery",
"dashedName": "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.",
@ -726,12 +715,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed108826",
"name": "Waypoint: Target a Specific Child of an Element Using jQuery",
"dashedName": "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.",
@ -783,13 +772,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aed008826",
"name": "Waypoint: Target Even Numbered Elements Using jQuery",
"dashedName": "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.",
@ -843,13 +831,12 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
},
{
"id": "bad87fee1348bd9aecb08826",
"name": "Waypoint: Use jQuery to Modify the Entire Page",
"dashedName": "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!",
@ -901,6 +888,7 @@
" </div>",
"</div>"
],
"type": "waypoint",
"challengeType": 0
}
]

View File

@ -1,6 +1,5 @@
{
"name": "JSON APIs and Ajax - Coming Soon",
"dashedName": "json-apis-and-ajax",
"name": "JSON APIs and Ajax - Coming Soon",
"order": 0.007,
"challenges": [
]

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7243d8c341eddeaeb5bd0f",
"name": "Waypoint: Store Data in MongoDB",
"dashedName": "waypoint-store-data-in-mongodb",
"title": "Store Data in MongoDB",
"difficulty": 0.01,
"challengeSeed": ["133316035"],
"description": [
@ -34,6 +33,7 @@
"Complete \"Aggregate\"",
"Once you've completed these steps, move on to our next challenge."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",

View File

@ -4,8 +4,7 @@
"challenges": [
{
"id": "bd7153d8c441eddfaeb5bd0f",
"name": "Waypoint: Manage Packages with NPM",
"dashedName": "waypoint-manage-packages-with-npm",
"title": "Manage Packages with NPM",
"difficulty": 0.39,
"challengeSeed": ["126433450"],
"description": [
@ -43,6 +42,7 @@
"Complete \"Finale\"",
"Once you've completed these steps, move on to our next challenge."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",
@ -58,8 +58,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bdff",
"name": "Waypoint: Start a Node.js Server",
"dashedName": "waypoint-start-a-nodejs-server",
"title": "Start a Node.js Server",
"difficulty": 0.40,
"challengeSeed": ["126411561"],
"description": [
@ -85,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": "",
@ -100,8 +100,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bdfe",
"name": "Waypoint: Continue working with Node.js Servers",
"dashedName": "waypoint-continue-working-with-nodejs-servers",
"title": "Continue working with Node.js Servers",
"difficulty": 0.41,
"challengeSeed": ["128836506"],
"description": [
@ -114,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": "",
@ -129,8 +129,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bdfd",
"name": "Waypoint: Finish working with Node.js Servers",
"dashedName": "waypoint-finish-working-with-nodejs-servers",
"title": "Finish working with Node.js Servers",
"difficulty": 0.42,
"challengeSeed": ["128836507"],
"description": [
@ -143,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": "",
@ -158,8 +158,7 @@
},
{
"id": "bd7153d8c441eddfaeb5bd1f",
"name": "Waypoint: Build Web Apps with Express.js",
"dashedName": "waypoint-build-web-apps-with-expressjs",
"title": "Build Web Apps with Express.js",
"difficulty": 0.43,
"challengeSeed": [
"126411559"
@ -186,6 +185,7 @@
"Complete \"JSON Me\"",
"Once you've completed these steps, move on to our next challenge."
],
"type": "waypoint",
"challengeType": 2,
"tests": [],
"nameCn": "",

View File

@ -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.",
@ -42,6 +41,7 @@
"Closures",
"Details of the Object Model"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],
@ -56,7 +56,7 @@
},
{
"id": "af4afb223120f7348cdfc9fd",
"name": "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": [],
@ -97,8 +98,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.",
@ -123,6 +123,7 @@
"MDNlinks": [
"Array.reduce()"
],
"type": "bonfire",
"challengeType": 5,
"nameCn": "",
"descriptionCn": [],

View File

@ -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));
}
@ -18,30 +17,55 @@ var Nonprofit = app.models.Nonprofit;
var Job = app.models.Job;
var counter = 0;
var challenges = getFilesFor('challenges');
var offerings = 2 + challenges.length;
// plus two accounts for nonprofits and jobs seed.
var numberToSave = challenges.length + 1;
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 >= numberToSave) {
process.exit(0);
}
};
// Log where in the seed order we're currently at
console.log('Call: ' + counter + '/' + numberToSave);
}
Challenge.destroyAll(function(err, info) {
if (err) {
console.error(err);
throw err;
} else {
console.log('Deleted ', info);
}
challenges.forEach(function(file) {
var challenges = require('./challenges/' + file).challenges
.map(function(challenge) {
var challengeSpec = require('./challenges/' + file);
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
challenge.title = challenge.name.replace(challangesRegex, '').trim();
challenge.name =
_.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;
});
@ -49,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);
}
}
);
@ -67,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);
});
});