Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging
This commit is contained in:
@ -423,7 +423,7 @@
|
||||
"description": [
|
||||
"",
|
||||
"In JavaScript we can store lists or collections of data in what are called arrays",
|
||||
"Arrays are distinguished by the <code> [ </code> and <code> ] </code> around the data. Each piece of data is separated be a <code> , </code>",
|
||||
"Arrays are distinguished by the <code> [ </code> and <code> ] </code> around the data. Each piece of data is separated by a <code> , </code>",
|
||||
"Now let's create a new array called <code> myArray </code> with a <code> string </code> and a <code> number </code> with a <code> , </code> separating each one",
|
||||
"Refer to the example if you get stuck",
|
||||
""
|
||||
@ -503,7 +503,7 @@
|
||||
"difficulty":"9.98171",
|
||||
"description":[
|
||||
"",
|
||||
"We are able to modify the data store in an array be using indexes",
|
||||
"We are able to modify the data stored in an array by using indexes",
|
||||
"Example:",
|
||||
"<code>",
|
||||
"var ourArray = [1,2,3];",
|
||||
@ -536,10 +536,10 @@
|
||||
"difficulty": "9.9818",
|
||||
"description": [
|
||||
"",
|
||||
"When and array has been defined we still have the ability to make changes to it afterwards",
|
||||
"When an array has been defined we still have the ability to make changes to it afterwards",
|
||||
"One common way in which we can manipulate the data in an array is through <code> .pop() </code>",
|
||||
"<code> .pop() </code> is used to \"pop\" a value from the end of an array. We can retrieve this value by preforming the pop in a variable declaration.",
|
||||
"any type of variable can be \"popped\" from and array",
|
||||
"<code> .pop() </code> is used to \"pop\" a value from the end of an array. We can retrieve this value by performing the pop in a variable declaration.",
|
||||
"Any type of variable can be \"popped\" from an array",
|
||||
"Let's try <code> .pop() </code> now"
|
||||
],
|
||||
"tests": [
|
||||
@ -639,13 +639,13 @@
|
||||
"description":[
|
||||
"",
|
||||
"In JavaScript we can divide up our code into separate and reusable parts called functions",
|
||||
"here's and example of a function",
|
||||
"Here's an example of a function",
|
||||
"<code>",
|
||||
"function functionName (a, b){",
|
||||
" return(a + b);",
|
||||
"}",
|
||||
"</code>",
|
||||
"our function can be called like this",
|
||||
"Our function can be called like this",
|
||||
"<code>functionName();</code>",
|
||||
"Let's try creating and calling a function now called <code>myFunction</code>"
|
||||
],
|
||||
@ -677,7 +677,7 @@
|
||||
"description":[
|
||||
"",
|
||||
"A very important data type in javascript is the <code> Object </code>",
|
||||
"<code> Objects </code> a similar to <code> arrays </code> except that instead of using indexes to access and modify their data, Objects have what are called <code> properties </code>",
|
||||
"<code> Objects </code> are similar to <code> arrays </code> except that instead of using indexes to access and modify their data, Objects have what are called <code> properties </code>",
|
||||
"Here's a sample Object",
|
||||
"<code>",
|
||||
"var cat = {",
|
||||
@ -688,7 +688,7 @@
|
||||
"};",
|
||||
"</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 a Object that represents a dog called myDog!"
|
||||
"Let's try to make an Object that represents a dog called myDog!"
|
||||
|
||||
],
|
||||
"tests":[
|
||||
|
@ -1883,7 +1883,7 @@
|
||||
"Above your right-well, inside its \"col-xs-6\" <code>div</code> element, add a <code>h4</code> element with the text \"#right-well\"."
|
||||
],
|
||||
"tests": [
|
||||
"assert($('.col-xs-12').children('h4') && $('.col-xs-12').children('h4').length > 1, 'Add an <code>h4</code> element to each of your <code><div class=\\'col-xs-6\\'></code> elements.');",
|
||||
"assert($('.col-xs-6').children('h4') && $('.col-xs-6').children('h4').length > 1, 'Add an <code>h4</code> element to each of your <code><div class=\\'col-xs-6\\'></code> elements.');",
|
||||
"assert(new RegExp('#left-well','gi').test($('h4').text()), 'One <code>h4</code> element should have the text \"#left-well\".');",
|
||||
"assert(new RegExp('#right-well','gi').test($('h4').text()), 'One <code>h4</code> element should have the text \"#right-well\".');"
|
||||
],
|
||||
@ -2036,9 +2036,9 @@
|
||||
"Add a comment at the top of your HTML that says <code>You shouldn't need to modify code below this line</code>."
|
||||
],
|
||||
"tests": [
|
||||
"assert(editor.match(/<!--/g).length > 1, 'Start a comment with <code><!--</code>.')",
|
||||
"assert(editor.match(/this line/g).length > 1, 'Your comment should have the text <code>You shouldn't need to modify code below this line</code>')",
|
||||
"assert(editor.match(/-->/g).length > 1, 'Be sure to close your comment with <code>--></code>.')"
|
||||
"assert(editor.match(/<!--/g) && editor.match(/<!--/g).length > 0, 'Start a comment with <code><!--</code>.')",
|
||||
"assert(editor.match(/this line/g) && editor.match(/this line/g).length > 0, \"Your comment should have the text <code>You shouldn't need to modify code below this line</code>\")",
|
||||
"assert(editor.match(/-->/g) && editor.match(/-->/g).length > 0, 'Be sure to close your comment with <code>--></code>.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<div class='container-fluid'>",
|
||||
|
@ -103,7 +103,7 @@
|
||||
"difficulty": "2.02",
|
||||
"description": [
|
||||
"Convert the given number into a roman numeral.",
|
||||
"All <a href=\"http://www.mathsisfun.com/roman-numerals.html\">roman numerals</a> answers should be provided in upper-case.",
|
||||
"All <a href=\"http://www.mathsisfun.com/roman-numerals.html\" target="_blank">roman numerals</a> answers should be provided in upper-case.",
|
||||
"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": [
|
||||
@ -356,7 +356,7 @@
|
||||
" return arr1;",
|
||||
"}",
|
||||
"",
|
||||
"unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);"
|
||||
"unite([1, 3, 2], [5, 2, 1, 4], [2, 1]);"
|
||||
],
|
||||
"tests": [
|
||||
"assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');",
|
||||
@ -675,7 +675,8 @@
|
||||
"tests": [
|
||||
"assert.deepEqual(steamroller([[['a']], [['b']]]), ['a', 'b'], 'should flatten nested arrays');",
|
||||
"assert.deepEqual(steamroller([1, [2], [3, [[4]]]]), [1, 2, 3, 4], 'should flatten nested arrays');",
|
||||
"assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');"
|
||||
"assert.deepEqual(steamroller([1, [], [3, [[4]]]]), [1, 3, 4], 'should work with empty arrays');",
|
||||
"assert.deepEqual(steamroller([1, {}, [3, [[4]]]]), [1, {}, 3, 4], 'should work with actual objects');"
|
||||
],
|
||||
"MDNlinks": [
|
||||
"Array.isArray()"
|
||||
|
@ -257,9 +257,9 @@
|
||||
"dashedName": "waypoint-target-the-same-element-with-multiple-jQuery-Selectors",
|
||||
"difficulty": 3.06,
|
||||
"description": [
|
||||
"Now you know three ways of targeting elements: by type (<code>$('button')</code>), by class (<code>($('.btn')</code>), and by id (<code>($'#target1')</code>).",
|
||||
"Now you know three ways of targeting elements: by type <code>$('button')</code>, by class <code>$('.btn')</code>), and by id <code>$('#target1')</code>).",
|
||||
"Use each of these jQuery selectors to target your <code>button</code> element with the class \"btn\" and the id \"target1\".",
|
||||
"Use the <code>addClass()</code> jQuery function to give the element one new class for each selector: \"animated\", \"shake\", and \"button-primary\"."
|
||||
"Use the <code>addClass()</code> jQuery function to give the element one new class for each selector: \"animated\", \"shake\", and \"btn-primary\"."
|
||||
],
|
||||
"tests": [
|
||||
"assert(editor.match(/\\$\\(\\'button\\'\\)/g), 'Use the <code>$\\(\\'button\\'\\)</code> selector.')",
|
||||
|
@ -92,6 +92,8 @@ var users = dbObservable
|
||||
user.username = 'fcc' + uuid.v4().slice(0, 8);
|
||||
if (user.github) {
|
||||
user.isGithubCool = true;
|
||||
} else {
|
||||
user.isMigrationGrandfathered = true;
|
||||
}
|
||||
return user;
|
||||
})
|
||||
|
Reference in New Issue
Block a user