diff --git a/client/commonFramework/end.js b/client/commonFramework/end.js index 1a8ae7be86..149ef4e777 100644 --- a/client/commonFramework/end.js +++ b/client/commonFramework/end.js @@ -66,13 +66,14 @@ $(document).ready(function() { .catch(err => Observable.just({ err })); }) .subscribe( - ({ err, output, originalCode }) => { + ({ err, output, originalCode, tests }) => { if (err) { console.error(err); return common.updateOutputDisplay('' + err); } common.codeStorage.updateStorage(challengeName, originalCode); common.codeUri.querify(originalCode); + common.displayTestResults(tests, true); common.updateOutputDisplay(output); return null; }, diff --git a/client/less/main.less b/client/less/main.less index 0d2614133f..d9cac6ae6e 100644 --- a/client/less/main.less +++ b/client/less/main.less @@ -1155,6 +1155,15 @@ code { } } +//make about page contact table reponsive on small screens +@media only screen +and (max-width : 400px) { + table.response-table td { + width: 100%; + display: block; + } +} + // make btn-default hover more visible .btn-default:active, .btn-default:hover { diff --git a/seed/challenges/00-getting-started/getting-started.json b/seed/challenges/00-getting-started/getting-started.json index 3236c8df90..8ec7a379cc 100644 --- a/seed/challenges/00-getting-started/getting-started.json +++ b/seed/challenges/00-getting-started/getting-started.json @@ -335,7 +335,7 @@ [ "//i.imgur.com/pYk0wOk.gif", "この gif は GitHub のレポジトリへのスターをつける方法です。", - "オープンソースの Free Code Camp のレポジトリを開いてください。これは私たちボランティアチームの協力者が Free Code Camp で作っているものです。あなたは \"star\" を私たちのリポジトリに付けることができます。\"star を付けること\"は GitHub での \"いいね\" と一緒です。", + "オープンソースの Free Code Camp のレポジトリを開いてください。これは私たちボランティアチームの協力者が Free Code Camp で作っているものです。", "https://github.com/freecodecamp/freecodecamp" ], [ @@ -391,8 +391,8 @@ ], [ "//i.imgur.com/pYk0wOk.gif", - "A gif showing how you can star a GitHub repo.", - "Open Free Code Camp's open-source repository. This is where our volunteer team collaborates on building Free Code Camp. You can \"star\" our repository. \"Starring\" is the GitHub equivalent of \"liking\" something.", + "A gif showing how you Free Code Camp's GitHub repo.", + "Open Free Code Camp's open-source repository. This is where our volunteer team collaborates on building Free Code Camp.", "https://github.com/freecodecamp/freecodecamp" ], [ @@ -452,7 +452,7 @@ [ "//i.imgur.com/pYk0wOk.gif", "Un gif montrant comment vous pouvez activer un repo GitHub.", - "Ouvrez open-source du dépôt central de Camp Code Free . Ceci est où notre équipe de bénévoles collabore à la construction de Camp Code Free. Vous pouvez \"star\" notre référentiel. Mettant en \"vedette\" est la GitHub équivalent de \"goût\" quelque chose.", + "Ouvrez open-source du dépôt central de Camp Code Free . Ceci est où notre équipe de bénévoles collabore à la construction de Camp Code Free.", "https://github.com/freecodecamp/freecodecamp" ], [ @@ -510,7 +510,7 @@ "//i.imgur.com/pYk0wOk.gif", "Un gif mostrándote como puedes dar una estrella a un repositorio de GitHub.", "Ve al repositorio de código libre de Free Code Camp y dale una \"estrella\". Las \"estrellas\" son el equivalente en GitHub de los \"me gusta\".", - "Si quieres, ve al repositorio de código libre de Free Code Camp y dale una \"estrella\". Las \"estrellas\" son el equivalente en GitHub de los \"me gusta\".", + "Si quieres, ve al repositorio de código libre de Free Code Camp.", "https://github.com/freecodecamp/freecodecamp" ], [ diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index 57fefa2c28..74c127c902 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -293,7 +293,7 @@ "" ], "tail": [ - "(function(z){return 'sum='+z;})(sum);" + "(function(z){return 'sum = '+z;})(sum);" ], "solutions": [ "var sum = 10 + 10;" @@ -330,7 +330,7 @@ "" ], "tail": [ - "(function(z){return 'difference='+z;})(difference);" + "(function(z){return 'difference = '+z;})(difference);" ], "solutions": [ "var difference = 45 - 33;" @@ -920,7 +920,6 @@ "", "// Only change code below this line", "", - "", "" ], "tail": [ @@ -1351,6 +1350,7 @@ "", "// Only change code below this line", "firstLetterOfLastName = lastName;", + "", "" ], "tail": [ @@ -1610,7 +1610,7 @@ ], "challengeSeed": [ "// Example", - "var array = [\"John\", 23];", + "var ourArray = [\"John\", 23];", "", "// Only change code below this line.", "var myArray = [];", @@ -2076,14 +2076,13 @@ ], "challengeSeed": [ "// Example", - "function reusableFunction() {", + "function ourReusableFunction() {", " console.log(\"Heyya, World\");", "}", "", - "reusableFunction();", + "ourReusableFunction();", "", "// Only change code below this line", - "", "" ], "tail": [ @@ -2156,10 +2155,10 @@ ], "challengeSeed": [ "// Example", - "function functionWithArgs(a, b) {", + "function ourFunctionWithArgs(a, b) {", " console.log(a - b);", "}", - "functionWithArgs(10, 5); // Outputs 5", + "ourFunctionWithArgs(10, 5); // Outputs 5", "", "// Only change code below this line.", "", @@ -2621,7 +2620,7 @@ ], "challengeSeed": [ "// Example", - "function ourFunction(isItTrue) {", + "function ourTrueOrFalse(isItTrue) {", " if (isItTrue) { ", " return \"Yes, it's true\";", " }", @@ -4331,20 +4330,16 @@ "id": "56533eb9ac21ba0edf2244cb", "title": "Manipulating Complex Objects", "description": [ - "JavaScript objects are flexible because they allow for Data Structures with arbitrary combinations of strings, numbers, booleans, arrays, functions, and objects.", - "Here is an example of a complex data structure:", + "Sometimes you may want to store data in a flexible Data Structure. A JavaScript object is one way to handle flexible data. They allow for arbitrary combinations of strings, numbers, booleans, arrays, functions, and objects.", + "Here's an example of a complex data structure:", "
var ourMusic = [", - "This is an array of objects and the object has various pieces of metadata about an album. It also has a nested
{
\"artist\": \"Daft Punk\",
\"title\": \"Homework\",
\"release_year\": 1997,
\"formats\": [
\"CD\",
\"Cassette\",
\"LP\" ],
\"gold\": true
}
];
formats
array. Additional album records could be added to the top level array.",
- "NoteJSON
is a data interchange format used to store data (source: json.org).",
- "A property is the part of an object that associates a key (either a String value or a Symbol value) and a value (source: ecma-international.org/ecma-262/6.0/#sec-property). So, a property consists of a key - value pair. (source: spacetelescope.github.io/understanding-json-schema/reference/object.html#properties). Property keys (also known as names) should be in quotation marks.",
- "Like JavaScript Objects, JSON is flexible because it is heterogeneous, meaning it permits Data Structures with arbitrary combinations of strings, booleans, numbers, arrays, and objects.",
- "Here is an example of a JSON object:",
- "var ourMusic = [", - "This is an array of objects and the object has various pieces of metadata about an album. It also has a nested
{
\"artist\": \"Daft Punk\",
\"title\": \"Homework\",
\"release_year\": 1997,
\"formats\": [
\"CD\",
\"Cassette\",
\"LP\" ],
\"gold\": true
}
];
formats
array. Additional album records could be added to the top level array.",
- "Note\"formats\"
array. If you want to add more album records, you can do this by adding records to the top level array.",
+ "Objects hold data in a property, which has a key-value format. In the example above, \"artist\": \"Daft Punk\"
is a property that has a key of \"artist\"
and a value of \"Daft Punk\"
.",
+ "JavaScript Object Notation or JSON
is a related data interchange format used to store data.",
+ "{", + "Note
\"artist\": \"Daft Punk\",
\"title\": \"Homework\",
\"release_year\": 1997,
\"formats\": [
\"CD\",
\"Cassette\",
\"LP\"
],
\"gold\": true
}
myMusic
object. Add artist
and title
strings, release_year
number, and a formats
array of strings."
+ "Add a new album to the myMusic
array. Add artist
and title
strings, release_year
number, and a formats
array of strings."
],
"releasedOn": "January 1, 2016",
"challengeSeed": [
@@ -4401,7 +4396,7 @@
"Here is a nested object:",
"var ourStorage = {", "
\"desk\": {
\"drawer\": \"stapler\"
},
\"cabinet\": {
\"top drawer\": {
\"folder1\": \"a file\",
\"folder2\": \"secrets\"
},
\"bottom drawer\": \"soda\"
}
}
ourStorage.cabinet[\"top drawer\"].folder2; // \"secrets\"
ourStorage.desk.drawer; // \"stapler\"
myStorage
object to retrieve the contents of the glove box
. Use bracket notation for properties with a space in their name."
+ "Access the myStorage
object and assign the contents of the glove box
property to the gloveBoxContents variable. Use bracket notation for properties with a space in their name."
],
"releasedOn": "January 1, 2016",
"challengeSeed": [
@@ -4739,6 +4734,7 @@
"var myArray = [];",
"",
"// Only change code below this line.",
+ "",
""
],
"tail": [
@@ -5091,12 +5087,12 @@
],
"challengeSeed": [
"// Example",
- "function ourFunction(ourMin, ourMax) {",
+ "function ourRandomRange(ourMin, ourMax) {",
"",
" return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;",
"}",
"",
- "ourFunction(1, 9);",
+ "ourRandomRange(1, 9);",
"",
"// Only change code below this line.",
"",
diff --git a/seed/challenges/01-front-end-development-certification/html5-and-css.json b/seed/challenges/01-front-end-development-certification/html5-and-css.json
index ca6cca12f2..5e89efbdee 100644
--- a/seed/challenges/01-front-end-development-certification/html5-and-css.json
+++ b/seed/challenges/01-front-end-development-certification/html5-and-css.json
@@ -265,7 +265,7 @@
"assert($(\"h1\").length > 0, 'message: Make your h1
element visible on your page by uncommenting it.');",
"assert($(\"h2\").length > 0, 'message: Make your h2
element visible on your page by uncommenting it.');",
"assert($(\"p\").length > 0, 'message: Make your p
element visible on your page by uncommenting it.');",
- "assert(!/-->/gi.test(code), 'message: Be sure to delete all trailing comment tags, i.e. -->
.');"
+ "assert(!/-->/gi.test(code.replace(/ *