Merge branch 'staging' into add-quotes
This commit is contained in:
@ -72,7 +72,7 @@
|
||||
"less-middleware": "~2.0.1",
|
||||
"lodash": "^3.9.3",
|
||||
"loopback": "https://github.com/FreeCodeCamp/loopback.git#fix/no-password",
|
||||
"loopback-boot": "^2.8.0",
|
||||
"loopback-boot": "2.8.2",
|
||||
"loopback-component-passport": "https://github.com/FreeCodeCamp/loopback-component-passport.git#feature/flashfailure",
|
||||
"loopback-connector-mongodb": "^1.10.0",
|
||||
"lusca": "~1.0.2",
|
||||
|
@ -569,7 +569,8 @@
|
||||
"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).",
|
||||
"Make a function that looks through an array (first argument) and returns an array of all objects that have equivalent property and value pair (second argument).",
|
||||
"For example, if the first argument is <code>[{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }]</code>, and the second argument is <code>{ last: 'Capulet' }</code>, then you must return the the third object from the array (the first argument), because it contains the property and it's value, that was passed on as the second argument.",
|
||||
"Remember to use <a href='//github.com/FreeCodeCamp/freecodecamp/wiki/How-to-get-help-when-you-get-stuck' target='_blank'>Read-Search-Ask</a> if you get stuck. Write your own code."
|
||||
],
|
||||
"challengeSeed": [
|
||||
@ -583,7 +584,9 @@
|
||||
],
|
||||
"tests": [
|
||||
"assert.deepEqual(where([{ first: 'Romeo', last: 'Montague' }, { first: 'Mercutio', last: null }, { first: 'Tybalt', last: 'Capulet' }], { last: 'Capulet' }), [{ first: 'Tybalt', last: 'Capulet' }], 'should return an array of objects');",
|
||||
"assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');"
|
||||
"assert.deepEqual(where([{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], { 'a': 1 }), [{ 'a': 1 }, { 'a': 1 }, { 'a': 1, 'b': 2 }], 'should return with multiples');",
|
||||
"assert.deepEqual(where([{ 'a': 1, 'b': 2 }, { 'a': 1 }, { 'a': 1, 'b': 2, 'c': 2 }], { 'a': 1, 'b': 2 }), [{ 'a': 1, 'b': 2 }, { 'a': 1, 'b': 2, 'c': 2 }], 'should return two objects in array');",
|
||||
"assert.deepEqual(where([{ 'a': 5 }, { 'a': 5 }, { 'a': 5, 'b': 10 }], { 'a': 5, 'b': 10 }), [{ 'a': 5, 'b': 10 }], 'should return a single object in array');"
|
||||
],
|
||||
"MDNlinks": [
|
||||
"Global Object",
|
||||
|
@ -189,7 +189,7 @@
|
||||
"Try looking at the <code>secondLetterOfFirstName</code> variable declaration if you get stuck."
|
||||
],
|
||||
"tests": [
|
||||
"assert(thirdLetterOfLastName === 'v', 'The third last letter of lastName should be a \"v\"');"
|
||||
"assert(thirdLetterOfLastName === 'v', 'The third letter of lastName should be a \"v\"');"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"var firstName = \"Ada\";",
|
||||
@ -515,7 +515,7 @@
|
||||
],
|
||||
"tests":[
|
||||
"assert((function(){if(typeof(myArray) != 'undefined' && myArray[0] == 3 && myArray[1] == 2 && myArray[2] == 3){return true;}else{return false;}})(), 'myArray should now be [3,2,3]');",
|
||||
"assert((function(){if(editor.getValue().match(/[0]/g).length >= 1 && editor.getValue().match(/=/g).length >= 2){return true;}else{return false;}})(), 'You should be using indexes to modify the values in myArray');"
|
||||
"assert((function(){if(editor.getValue().match(/myArray\\[0\\]\\s?=\\s?/g)){return true;}else{return false;}})(), 'You should be using correct index to modify the value in myArray');"
|
||||
],
|
||||
"challengeSeed":[
|
||||
"var ourArray = [1,2,3];",
|
||||
@ -718,7 +718,7 @@
|
||||
"<code> \"enemies\": [\"Water\", \"Dogs\"]</code>",
|
||||
"<code>};</code>",
|
||||
"</code>",
|
||||
"Objects are useful for storing data in a structured way, and can represents real world objects, like a cats.",
|
||||
"Objects are useful for storing data in a structured way, and can represent real world objects, like a cat.",
|
||||
"Let's try to make an Object that represents a dog called myDog which contains the properties 'name' (String), 'legs' (Number), 'tails' (Number) and 'friends' (Array)!"
|
||||
],
|
||||
"tests":[
|
||||
|
@ -213,7 +213,7 @@
|
||||
"assert(!editor.match(/e\"\\);/g) && !editor.match(/t\"\\);/g), 'Delete all three of your jQuery functions from your <code>document ready function</code>.')",
|
||||
"assert(editor.match(/<script>/g), 'Leave your <code>script</code> element intact.')",
|
||||
"assert(editor.match(/\\$\\(document\\)\\.ready\\(function\\(\\)\\s?\\{/g), 'Leave your <code>$(document).ready(function() {</code> to the beginning of your <code>script</code> element.')",
|
||||
"assert(editor.match(/\\n\\s+?\\}\\);/g), 'Leave your your \"document ready function\" closing <code>\\})</code> intact.')",
|
||||
"assert(editor.match(/\\n\\s+?\\}\\);/g), 'Leave your \"document ready function\" closing <code>\\})</code> intact.')",
|
||||
"assert(editor.match(/<\\/script>/g) && editor.match(/<script/g) && editor.match(/<\\/script>/g).length === editor.match(/<script/g).length, 'Leave your <code>script</code> element closing tag intact.')"
|
||||
],
|
||||
"challengeSeed": [
|
||||
|
@ -88,6 +88,8 @@ block content
|
||||
a(href="/challenges/#{challenge.dashedName}")
|
||||
span.capitalize= challenge.type + ': '
|
||||
span= challenge.title
|
||||
span.sr-only= "Complete"
|
||||
|
||||
|
||||
else
|
||||
.row
|
||||
@ -98,6 +100,7 @@ block content
|
||||
a(href="/challenges/#{challenge.dashedName}")
|
||||
span.capitalize= challenge.type + ': '
|
||||
span= challenge.title
|
||||
span.sr-only= "InComplete"
|
||||
|
||||
//#announcementModal.modal(tabindex='-1')
|
||||
// .modal-dialog.animated.fadeInUp.fast-animation
|
||||
|
@ -84,7 +84,7 @@ block content
|
||||
| Username not found
|
||||
label.negative-10.btn.btn-primary.btn-block#submitButton
|
||||
i.fa.fa-play
|
||||
| Run code (ctrl + enter)
|
||||
| Run tests (ctrl + enter)
|
||||
.button-spacer
|
||||
.btn-group.input-group.btn-group-justified
|
||||
label.btn.btn-success#trigger-reset-modal
|
||||
|
@ -32,7 +32,7 @@ block content
|
||||
.negative-bottom-margin-30
|
||||
label.negative-10.btn.btn-primary.btn-block#submitButton
|
||||
i.fa.fa-play
|
||||
| Run code (ctrl + enter)
|
||||
| Run tests (ctrl + enter)
|
||||
br
|
||||
if (user)
|
||||
.button-spacer
|
||||
|
@ -37,7 +37,7 @@ block content
|
||||
// extra field to distract password tools like lastpass from injecting css into our username field
|
||||
label.negative-10.btn.btn-primary.btn-block#submitButton
|
||||
i.fa.fa-play
|
||||
| Run code (ctrl + enter)
|
||||
| Run tests (ctrl + enter)
|
||||
.button-spacer
|
||||
.btn-group.input-group.btn-group-justified
|
||||
label.btn.btn-success#trigger-reset-modal
|
||||
|
Reference in New Issue
Block a user