improve challengeSeed for clarity and uniformity in Write Reusable JavaScript with Functions, Passing Values to Functions with Arguments, and Return a Value from a Function with Return

removed comma

Changed to reflect ourUniqueName()/uniqueName() pattern throughout

removed debugging artifact

change ourFunction(1, 9); to ourRandomRange(1, 9);

Remove second function calls where appropriate.
This commit is contained in:
Chad Kreutzer
2016-07-01 09:05:36 +00:00
parent f229aad1b6
commit 8d5820e24b

View File

@ -920,7 +920,6 @@
"", "",
"// Only change code below this line", "// Only change code below this line",
"", "",
"",
"" ""
], ],
"tail": [ "tail": [
@ -1352,6 +1351,7 @@
"", "",
"// Only change code below this line", "// Only change code below this line",
"firstLetterOfLastName = lastName;", "firstLetterOfLastName = lastName;",
"",
"" ""
], ],
"tail": [ "tail": [
@ -1611,7 +1611,7 @@
], ],
"challengeSeed": [ "challengeSeed": [
"// Example", "// Example",
"var array = [\"John\", 23];", "var ourArray = [\"John\", 23];",
"", "",
"// Only change code below this line.", "// Only change code below this line.",
"var myArray = [];", "var myArray = [];",
@ -2077,14 +2077,13 @@
], ],
"challengeSeed": [ "challengeSeed": [
"// Example", "// Example",
"function reusableFunction() {", "function ourReusableFunction() {",
" console.log(\"Heyya, World\");", " console.log(\"Heyya, World\");",
"}", "}",
"", "",
"reusableFunction();", "ourReusableFunction();",
"", "",
"// Only change code below this line", "// Only change code below this line",
"",
"" ""
], ],
"tail": [ "tail": [
@ -2157,10 +2156,10 @@
], ],
"challengeSeed": [ "challengeSeed": [
"// Example", "// Example",
"function functionWithArgs(a, b) {", "function ourFunctionWithArgs(a, b) {",
" console.log(a - b);", " console.log(a - b);",
"}", "}",
"functionWithArgs(10, 5); // Outputs 5", "ourFunctionWithArgs(10, 5); // Outputs 5",
"", "",
"// Only change code below this line.", "// Only change code below this line.",
"", "",
@ -2622,7 +2621,7 @@
], ],
"challengeSeed": [ "challengeSeed": [
"// Example", "// Example",
"function ourFunction(isItTrue) {", "function ourTrueOrFalse(isItTrue) {",
" if (isItTrue) { ", " if (isItTrue) { ",
" return \"Yes, it's true\";", " return \"Yes, it's true\";",
" }", " }",
@ -4740,6 +4739,7 @@
"var myArray = [];", "var myArray = [];",
"", "",
"// Only change code below this line.", "// Only change code below this line.",
"",
"" ""
], ],
"tail": [ "tail": [
@ -5092,12 +5092,12 @@
], ],
"challengeSeed": [ "challengeSeed": [
"// Example", "// Example",
"function ourFunction(ourMin, ourMax) {", "function ourRandomRange(ourMin, ourMax) {",
"", "",
" return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;", " return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;",
"}", "}",
"", "",
"ourFunction(1, 9);", "ourRandomRange(1, 9);",
"", "",
"// Only change code below this line.", "// Only change code below this line.",
"", "",