Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging
This commit is contained in:
@ -423,7 +423,7 @@
|
|||||||
"description": [
|
"description": [
|
||||||
"",
|
"",
|
||||||
"In JavaScript we can store lists or collections of data in what are called arrays",
|
"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",
|
"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",
|
"Refer to the example if you get stuck",
|
||||||
""
|
""
|
||||||
@ -503,7 +503,7 @@
|
|||||||
"difficulty":"9.98171",
|
"difficulty":"9.98171",
|
||||||
"description":[
|
"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:",
|
"Example:",
|
||||||
"<code>",
|
"<code>",
|
||||||
"var ourArray = [1,2,3];",
|
"var ourArray = [1,2,3];",
|
||||||
@ -536,10 +536,10 @@
|
|||||||
"difficulty": "9.9818",
|
"difficulty": "9.9818",
|
||||||
"description": [
|
"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>",
|
"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.",
|
"<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 and array",
|
"Any type of variable can be \"popped\" from an array",
|
||||||
"Let's try <code> .pop() </code> now"
|
"Let's try <code> .pop() </code> now"
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
@ -639,13 +639,13 @@
|
|||||||
"description":[
|
"description":[
|
||||||
"",
|
"",
|
||||||
"In JavaScript we can divide up our code into separate and reusable parts called functions",
|
"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>",
|
"<code>",
|
||||||
"function functionName (a, b){",
|
"function functionName (a, b){",
|
||||||
" return(a + b);",
|
" return(a + b);",
|
||||||
"}",
|
"}",
|
||||||
"</code>",
|
"</code>",
|
||||||
"our function can be called like this",
|
"Our function can be called like this",
|
||||||
"<code>functionName();</code>",
|
"<code>functionName();</code>",
|
||||||
"Let's try creating and calling a function now called <code>myFunction</code>"
|
"Let's try creating and calling a function now called <code>myFunction</code>"
|
||||||
],
|
],
|
||||||
@ -677,7 +677,7 @@
|
|||||||
"description":[
|
"description":[
|
||||||
"",
|
"",
|
||||||
"A very important data type in javascript is the <code> Object </code>",
|
"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",
|
"Here's a sample Object",
|
||||||
"<code>",
|
"<code>",
|
||||||
"var cat = {",
|
"var cat = {",
|
||||||
@ -688,7 +688,7 @@
|
|||||||
"};",
|
"};",
|
||||||
"</code>",
|
"</code>",
|
||||||
"Objects are useful for storing data in a structured way or in a way that represents a real world object like a cat.",
|
"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":[
|
"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\"."
|
"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": [
|
"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('#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\".');"
|
"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>."
|
"Add a comment at the top of your HTML that says <code>You shouldn't need to modify code below this line</code>."
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(editor.match(/<!--/g).length > 1, 'Start a 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).length > 1, 'Your comment should have the text <code>You shouldn't need to modify code below this line</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).length > 1, 'Be sure to close your comment with <code>--></code>.')"
|
"assert(editor.match(/-->/g) && editor.match(/-->/g).length > 0, 'Be sure to close your comment with <code>--></code>.')"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"<div class='container-fluid'>",
|
"<div class='container-fluid'>",
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
"difficulty": "2.02",
|
"difficulty": "2.02",
|
||||||
"description": [
|
"description": [
|
||||||
"Convert the given number into a roman numeral.",
|
"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."
|
"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": [
|
"challengeSeed": [
|
||||||
@ -356,7 +356,7 @@
|
|||||||
" return arr1;",
|
" return arr1;",
|
||||||
"}",
|
"}",
|
||||||
"",
|
"",
|
||||||
"unite([1, 2, 3], [5, 2, 1, 4], [2, 1]);"
|
"unite([1, 3, 2], [5, 2, 1, 4], [2, 1]);"
|
||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');",
|
"assert.deepEqual(unite([1, 3, 2], [5, 2, 1, 4], [2, 1]), [1, 3, 2, 5, 4], 'should return the union of the given arrays');",
|
||||||
@ -675,7 +675,8 @@
|
|||||||
"tests": [
|
"tests": [
|
||||||
"assert.deepEqual(steamroller([[['a']], [['b']]]), ['a', 'b'], 'should flatten nested arrays');",
|
"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, [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": [
|
"MDNlinks": [
|
||||||
"Array.isArray()"
|
"Array.isArray()"
|
||||||
|
@ -257,9 +257,9 @@
|
|||||||
"dashedName": "waypoint-target-the-same-element-with-multiple-jQuery-Selectors",
|
"dashedName": "waypoint-target-the-same-element-with-multiple-jQuery-Selectors",
|
||||||
"difficulty": 3.06,
|
"difficulty": 3.06,
|
||||||
"description": [
|
"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 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": [
|
"tests": [
|
||||||
"assert(editor.match(/\\$\\(\\'button\\'\\)/g), 'Use the <code>$\\(\\'button\\'\\)</code> selector.')",
|
"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);
|
user.username = 'fcc' + uuid.v4().slice(0, 8);
|
||||||
if (user.github) {
|
if (user.github) {
|
||||||
user.isGithubCool = true;
|
user.isGithubCool = true;
|
||||||
|
} else {
|
||||||
|
user.isMigrationGrandfathered = true;
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user