Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging

This commit is contained in:
Quincy Larson
2015-07-31 21:13:46 -07:00
3 changed files with 20 additions and 21 deletions

View File

@ -448,7 +448,7 @@
"Let's now go create a nested array called <code>myArray</code>"
],
"tests":[
"assert((function(){if(typeof(myArray) !== 'undefined' && typeof(myArray) === 'object' && typeof(myArray[0]) !== 'undefined' && typeof(myArray) === 'object'){return(true);}else{return(false);}})(), 'myArray should contain at least one array');"
"assert((function(){if(typeof(myArray) !== 'undefined' && typeof(myArray) === 'object' && typeof(myArray[0]) !== 'undefined' && typeof(myArray[0]) === 'object' && editor.getValue().match(/[[]]/g).length >= 1){return(true);}else{return(false);}})(), 'myArray should contain at least one array');"
],
"challengeSeed":[
"var myArray = [];",
@ -548,7 +548,7 @@
"//console.log(removed); //Gives 3",
"",
"var myArray = ['John', 23, ['cat', 2]];",
"var removed = _;//This should be ['cat', 2] and myArray should now be ['John', 23]",
"var removed = myArray;//This should be ['cat', 2] and myArray should now be ['John', 23]",
"",
"",
"(function(y, z){return('myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z));})(myArray, removed);"
@ -566,7 +566,7 @@
"Let's take the code we had last time and <code> push </code> this value to the end: <code> ['dog', 3] </code>"
],
"tests": [
"assert((function(d){if(d[2] != undefined && d[0] == 'John' && d[1] == 23 && d[2][0] == 'dog' && d[2][1] == 3){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23, [\"dog\", 3]])');"
"assert((function(d){if(d[2] != undefined && d[0] == 'John' && d[1] == 23 && d[2][0] == 'dog' && d[2][1] == 3 && d[2].length == 2){return(true);}else{return(false);}})(myArray), 'myArray should only have the first two values left([\"John\", 23, [\"dog\", 3]])');"
],
"challengeSeed": [
"var myArray = ['John', 23, ['cat', 2]];",
@ -595,7 +595,7 @@
],
"challengeSeed": [
"var myArray = ['John', 23, ['dog', 3]];",
"var removed = _;//This should be ['John'] and myArray should now be ['John', 23]",
"var removed = myArray;//This should be ['John'] and myArray should now be ['John', 23]",
"",
"",
"(function(y, z){return('myArray = ' + JSON.stringify(y) + ' & removed = ' + JSON.stringify(z));})(myArray, removed);"
@ -644,7 +644,7 @@
"Let's try creating and calling a function now called <code>myFunction</code>"
],
"tests":[
"assert((function(){if(typeof(f) !== 'undefined' && typeof(f) === 'number' && f === 9){return(true);}else{return(false);}})(), 'Your function should return the value of a + b');"
"assert((function(){if(typeof(f) !== 'undefined' && typeof(f) === 'number' && f === a + b && editor.getValue().match(RegExp('return\\\\(a\\\\+b\\\\)', 'g')).length >= 1){return(true);}else{return(false);}})(), 'Your function should return the value of a + b');"
],
"challengeSeed":[
"var a = 4;",
@ -726,7 +726,7 @@
""
],
"tests":[
"assert(myDog.bark != undefined, 'The property tails should have been deleted');",
"assert(myDog.bark != undefined, 'You should have added the property bark to myDog');",
"assert(myDog.tails == undefined, 'The property tails should have been deleted');"
],
"challengeSeed":[
@ -740,9 +740,9 @@
"//Re-create myDog",
"",
"var myDog = {",
" \"name\": _,",
" \"legs\": _,",
" \"tails\": _,",
" \"name\": 'Camper',",
" \"legs\": 4,",
" \"tails\": 1,",
" \"friends\": []",
"};",
"",
@ -1021,7 +1021,7 @@
],
"tests":[
"assert(test === 2, 'Your RegEx should have found two numbers in the testString');",
"assert(editor.getValue().match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');"
"assert(editorValue.match(/\\/\\\\d\\+\\//gi), 'You should be using the following expression /\\d+/gi to find the numbers in the testString');"
],
"challengeSeed":[
"var test = (function(){",
@ -1052,7 +1052,7 @@
],
"tests":[
"assert(test === 7, 'Your RegEx should have found seven spaces in the testString');",
"assert(editor.getValue().match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');"
"assert(editorValue.match(/\\/\\\\s\\+\\//gi), 'You should be using the following expression /\\s+/gi to find the spaces in the testString');"
],
"challengeSeed":[
"var test = (function(){",
@ -1083,14 +1083,14 @@
"<code> Math.floor(Math.random() * (5 - 1 + 1)) + 1; </code>"
],
"tests":[
"assert(typeof(runSlots($(''))[0]) == 'number', 'SlotOne should be a random number');",
"assert(typeof(runSlots($(''))[1]) == 'number', 'SlotTwo should be a random number');",
"assert(typeof(runSlots($(''))[2]) == 'number', 'SlotThree should be a random number');",
"assert(editor.getValue().match(/Math.floor\\(Math.random\\(\\) \\* \\(5 \\- 1 \\+ 1\\)\\) \\+ 1/g).length === 3);"
"assert(typeof(runSlots($('.slot'))[0]) == 'number', 'SlotOne should be a random number');",
"assert(typeof(runSlots($('.slot'))[1]) == 'number', 'SlotTwo should be a random number');",
"assert(typeof(runSlots($('.slot'))[2]) == 'number', 'SlotThree should be a random number');",
"assert(editorValue.match(/Math.floor\\(Math.random\\(\\) \\* \\(5 \\- 1 \\+ 1\\)\\) \\+ 1/g).length === 3);"
],
"challengeSeed":[
"fccss",
" function runSlots(slots){",
" function runSlots(){",
" var slotOne;",
" var slotTwo;",
" var slotThree;",
@ -1111,7 +1111,7 @@
"",
" $(document).ready(function(){",
" $('.go').click(function(){",
" runSlots(slots);",
" runSlots();",
" });",
" });",
"fcces",

View File

@ -254,9 +254,8 @@
"Click \"News\" in the upper right hand corner.",
"You'll see a variety of links that have been submitted. Click on the \"Discuss\" button under one of them.",
"You can upvote links. This will push the link up the rankings of hot links.",
"You can also comment on a link. If someone responds to your comment, you'll get an email notification so you can come back and respond to them.",
"You can also submit links. You can modify the link's headline and also leave an initial comment about the link.",
"You can view the portfolio pages of any camper who has posted links or comments on Camper News. Just click on their photo.",
"You can also submit links.",
"You can view the portfolio pages of any camper who has posted links on Camper News. Just click on their photo.",
"When you submit a link, you'll get a point. You will also get a point each time someone upvotes your link.",
"Now that you've learned how to use Camper News, let's move on to your next challenge."
],

View File

@ -18,7 +18,7 @@
"<span class='text-info'>User Story:</span> As a user, I can click on a post to be taken to the story's original URL.",
"<span class='text-info'>User Story:</span> As a user, I can click a link to go directly to the post's discussion page.",
"<span class='text-info'>Bonus User Story:</span> As a user, I can see how many upvotes each story has.",
"<span class='text-info'>Hint:</span> Here's the Camper News Hot Stories API endpoint: <code>http://www.freecodecamp.com/stories/hotStories</code>.",
"<span class='text-info'>Hint:</span> Here's the Camper News Hot Stories API endpoint: <code>http://www.freecodecamp.com/news/hot</code>.",
"Remember to use <a href='/field-guide/how-do-i-get-help-when-I-get-stuck' target='_blank'>RSAP</a> if you get stuck.",
"When you are finished, click the \"I've completed this challenge\" button and include a link to your CodePen. If you pair programmed, you should also include the Free Code Camp username of your pair.",
"If you'd like immediate feedback on your project, click this button and paste in a link to your CodePen project. Otherwise, we'll review it before you start your nonprofit projects.<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>"