From 11d439c5d9872ae47f52481f15e056f120797605 Mon Sep 17 00:00:00 2001 From: SaintPeter Date: Sun, 27 Dec 2015 13:49:22 -0800 Subject: [PATCH] More Improvements --- .../basic-javascript.json | 130 +++++++++--------- 1 file changed, 66 insertions(+), 64 deletions(-) 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 b1af365971..726f9d9f62 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -98,7 +98,7 @@ "Assign the value 7 to variable a", "Assign the contents of a to variable b." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(/var a;/.test(editor.getValue()) && /var b = 2;/.test(editor.getValue()), 'message: Do not change code above the line');", "assert(typeof a === 'number' && a === 7, 'message: a should have a value of 7');", @@ -142,7 +142,7 @@ "

Instructions

", "Define a variable a with var and initialize it to a value of 9." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(/var\\s+a\\s*=\\s*9\\s*/.test(editor.getValue()), 'message: Initialize a to a value of 9');" ], @@ -175,7 +175,7 @@ "

Instructions

", "Initialize the three variables a, b, and c with 5, 10, and \"I am a\" respectively so that they will not be undefined." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof a === 'number' && a === 6, 'message: a should be defined and have a value of 6');", "assert(typeof b === 'number' && b === 15, 'message: b should be defined and have a value of 15');", @@ -227,7 +227,7 @@ "

Instructions

", "Correct the variable assignments so their names match their variable declarations above." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(StUdLyCapVaR === 10, 'message: StUdLyCapVaR has the correct case');", "assert(properCamelCase === \"A String\", 'message: properCamelCase has the correct case');", @@ -392,7 +392,7 @@ "

Instructions

", "Change the code to use the ++ operator on myVar" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myVar === 88, 'message: myVar should equal 88');", "assert(/[+]{2}/.test(editor.getValue()), 'message: Use the ++ operator');", @@ -431,7 +431,7 @@ "

Instructions

", "Change the code to use the -- operator on myVar" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myVar === 10, 'message: myVar should equal 10');", "assert(/myVar[-]{2}/.test(editor.getValue()), 'message: Use the -- operator on myVar');", @@ -548,7 +548,7 @@ "

Instructions

", "Set remainder equal to the remainder of 11 divided by 3 using the remainder (%) operator." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(remainder === 2, 'message: The value of remainder should be 2');", "assert(/\\d+\\s*%\\s*\\d+/.test(editor.getValue()), 'message: You should use the % operator');" @@ -585,7 +585,7 @@ "

Instructions

", "Convert the assignments for a, b, and c to use the += operator." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(a === 15, 'message: a should equal 15');", "assert(b === 26, 'message: b should equal 26');", @@ -636,7 +636,7 @@ "

Instructions

", "Convert the assignments for a, b, and c to use the -= operator." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(a === 5, 'message: a should equal 5');", "assert(b === -6, 'message: b should equal -6');", @@ -690,7 +690,7 @@ "

Instructions

", "Convert the assignments for a, b, and c to use the *= operator." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(a === 25, 'message: a should equal 25');", "assert(b === 36, 'message: b should equal 36');", @@ -742,7 +742,7 @@ "

Instructions

", "Convert the assignments for a, b, and c to use the /= operator." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(a === 4, 'message: a should equal 4');", "assert(b === 27, 'message: b should equal 27');", @@ -790,7 +790,7 @@ "The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5, plus 32.", "You are given a variable Tc representing a temperature in Celsius. Create a variable Tf and apply the algorithm to assign it the corresponding temperature in Fahrenheit." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof convert(0) === 'number', 'message: convert(0) should return a number');", "assert(convert(-30) === -22, 'message: convert(-30) should return a value of -22');", @@ -879,7 +879,7 @@ "Use backslashes to assign the following to myStr variable:", "\"I am a \"double quoted\" string inside \"double quotes\"\"" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(editor.getValue().match(/\\\\\"/g).length === 4 && editor.getValue().match(/[^\\\\]\"/g).length === 2, 'message: You should use two double quotes (") and four escaped double quotes (\") ');" ], @@ -910,7 +910,7 @@ "

Instructions

", "Change the provided string from double to single quotes and remove the escaping." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(!/\\\\/g.test(editor.getValue()), 'message: Remove all the backslashes (\\)');", "assert(editor.getValue().match(/\"/g).length === 4 && editor.getValue().match(/'/g).length === 2, 'message: You should have two single quotes ' and four double quotes "');", @@ -945,7 +945,7 @@ "

Instructions

", "Encode the following sequence, separated by spaces:
backslash tab tab carriage-return new-line and assign it to myStr" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myStr === \"\\\\ \\t \\t \\r \\n\", 'message: myStr should have the escape sequences for backslash tab tab carriage-return new-line separated by spaces');" ], @@ -977,7 +977,7 @@ "Build myStr from the strings \"This is the start. \" and \"This is the end.\" using the + operator.", "" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myStr === \"This is the start. This is the end.\", 'message: myStr should have a value of This is the start. This is the end');", "assert(editor.getValue().match(/\"\\s*\\+\\s*\"/g).length > 1, 'message: Use the + operator to build myStr');" @@ -1011,7 +1011,7 @@ "

Instructions

", "Build myStr over several lines by concatenating these two strings:
\"This is the first line. \" and \"This is the second line.\" using the += operator." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myStr === \"This is the first line. This is the second line.\", 'message: myStr should have a value of This is the first line. This is the second line.');", "assert(editor.getValue().match(/\\w\\s*\\+=\\s*\"/g).length > 1 && editor.getValue().match(/\\w\\s*\\=\\s*\"/g).length > 1, 'message: Use the += operator to build myStr');" @@ -1047,7 +1047,7 @@ "

Instructions

", "Set myName and build myStr with myName between the strings \"My name is \" and \" and I am swell!\"" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof myName !== 'undefined' && myName.length > 2, 'message: myName should be set to a string at least 3 characters long');", "assert(editor.getValue().match(/\"\\s*\\+\\s*myName\\s*\\+\\s*\"/g).length > 0, 'message: Use two + operators to build myStr with myName inside it');" @@ -1083,7 +1083,7 @@ "

Instructions

", "Set someAdjective and append it to myStr using the += operator." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof someAdjective !== 'undefined' && someAdjective.length > 2, 'message: someAdjective should be set to a string at least 3 characters long');", "assert(editor.getValue().match(/\\w\\s*\\+=\\s*someAdjective\\s*;/).length > 0, 'message: Append someAdjective to myStr using the += operator');" @@ -1119,7 +1119,7 @@ }, { "id": "bd7123c9c448eddfaeb5bdef", - "title": "Find Length of a String", + "title": "Find the Length of a String", "description": [ "You can find the length of a String value by writing .length after the string variable or string literal.", "\"Alan Peter\".length; // 10", @@ -1210,7 +1210,7 @@ "

Instructions

", "Correct the assignment to myStr to achieve the desired effect." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myStr === \"Hello World\", 'message: myStr should have a value of Hello World');", "assert(/myStr = \"Jello World\"/.test(editor.getValue()), 'message: Do not change the code above the line');" @@ -1362,7 +1362,7 @@ "myNoun, myAdjective, myVerb, and myAdverb.", "The tests will run your function with several different inputs to make sure it works properly." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof wordBlanks(\"\",\"\",\"\",\"\") === 'string', 'message: wordBlanks(\"\",\"\",\"\",\"\") should return a string');", "assert(wordBlanks(\"\",\"\",\"\",\"\").length > 30, 'message: wordBlanks(\"\",\"\",\"\",\"\") should return at least 30 characters with empty inputs');", @@ -1544,6 +1544,7 @@ "

Instructions

", "Read from myArray using bracket notation so that myData is equal to 8" ], + "releasedOn": "January 1, 2016", "tests": [ "assert(myData === 8, 'message: myData should be equal to 8.');", "assert(/myArray\\[2\\]\\[1\\]/g.test(editor.getValue()), 'message: You should be using bracket notation to read the value from myArray.');" @@ -1728,7 +1729,7 @@ "[\"Chocolate Bar\", 15]", "There should be at least 5 sub-arrays in the list." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(isArray, 'message: myList should be an array');", "assert(hasString, 'message: The first elements in each of your sub-arrays must all be strings');", @@ -1855,7 +1856,7 @@ "

Instructions

", "
  1. Create a function called myFunction that accepts two arguments and outputs their sum to the dev console.
  2. Call the function.
" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof myFunction === 'function', 'message: myFunction should be a function');", "capture(); myFunction(1,2); uncapture(); assert(logOutput == 3, 'message: myFunction(1,2) should output 3');", @@ -1919,7 +1920,7 @@ "Declare a global variable myGlobal outside of any function. Initialize it to have a value of 10 ", "Inside function fun1, assign 5 to oopsGlobal without using the var keyword." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof myGlobal != \"undefined\", 'message: myGlobal should be defined');", "assert(myGlobal === 10, 'message: myGlobal should have a value of 10');", @@ -1992,7 +1993,7 @@ "

Instructions

", "Declare a local variable myVar inside myFunction" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "" ], @@ -2047,7 +2048,7 @@ "

Instructions

", "Add a local variable to myFunction to override the value of outerWear with \"sweater\"." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(outerWear === \"T-Shirt\", 'message: Do not change the value of the global outerWear');", "assert(myFunction() === \"sweater\", 'message: myFunction should return \"sweater\"');", @@ -2094,7 +2095,7 @@ "

Instructions

", "Create a function timesFive that accepts one argument, multiplies it by 5, and returns the new value." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof timesFive === 'function', 'message: timesFive should be a function');", "assert(timesFive(5) === 25, 'message: timesFive(5) should return 25');", @@ -2138,7 +2139,7 @@ "

Instructions

", "Call process function with an argument of 7 and assign it's return value to the variable processed." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(processed === 2, 'message: processed should have a value of 10');", "assert(/processed\\s*=\\s*process\\(\\s*7\\s*\\)\\s*;/.test(editor.getValue()), 'message: You should assign process to processed');" @@ -2176,7 +2177,7 @@ "In Computer Science a queue is an abstract Data Structure where items are kept in order. New items can be added at the back of the queue and old items are taken off from the front of the queue.", "Write a function queue which takes an \"array\" and an \"item\" as arguments. Add the item onto the end of the array, then remove and return the item at the front of the queue." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(queue([],1) === 1, 'message: queue([], 1) should return 1');", "assert(queue([2],1) === 2, 'message: queue([2], 1) should return 2');", @@ -2301,7 +2302,7 @@ "

Instructions

", "Add the equality operator to the indicated line so that the function will return \"Equal\" when val is equivalent to 12" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(10) === \"Not Equal\", 'message: myTest(10) should return \"Not Equal\"');", "assert(myTest(12) === \"Equal\", 'message: myTest(12) should return \"Equal\"');", @@ -2347,7 +2348,7 @@ "

Instructions

", "Use strict equality operator in if statement so the function will return \"Equal\" when val is strictly equal to 7" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(10) === \"Not Equal\", 'message: myTest(10) should return \"Not Equal\"');", "assert(myTest(7) === \"Equal\", 'message: myTest(7) should return \"Equal\"');", @@ -2392,7 +2393,7 @@ "

Instructions

", "Add the inequality operator != in the if statement so that the function will return \"Not Equal\" when val is not equivalent to 99" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(99) === \"Equal\", 'message: myTest(99) should return \"Equal\"');", "assert(myTest(\"99\") === \"Equal\", 'message: myTest(\"99\") should return \"Equal\"');", @@ -2439,7 +2440,7 @@ "

Instructions

", "Add the strict inequality operator to the if statement so the function will return \"Not Equal\" when val is not strictly equal to 17" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(17) === \"Equal\", 'message: myTest(17) should return \"Equal\"');", "assert(myTest(\"17\") === \"Not Equal\", 'message: myTest(\"17\") should return \"Not Equal\"');", @@ -2490,7 +2491,7 @@ "

Instructions

", "Add the greater than operator to the indicated lines so that the return statements make sense." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(0) === \"10 or Under\", 'message: myTest(0) should return \"10 or Under\"');", "assert(myTest(10) === \"10 or Under\", 'message: myTest(10) should return \"10 or Under\"');", @@ -2545,7 +2546,7 @@ "

Instructions

", "Add the greater than equal to operator to the indicated lines so that the return statements make sense." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(0) === \"9 or Under\", 'message: myTest(0) should return \"9 or Under\"');", "assert(myTest(9) === \"9 or Under\", 'message: myTest(9) should return \"9 or Under\"');", @@ -2603,7 +2604,7 @@ "

Instructions

", "Add the less than operator to the indicated lines so that the return statements make sense." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(0) === \"Under 25\", 'message: myTest(0) should return \"Under 25\"');", "assert(myTest(24) === \"Under 25\", 'message: myTest(24) should return \"Under 25\"');", @@ -2660,7 +2661,7 @@ "

Instructions

", "Add the less than equal to operator to the indicated lines so that the return statements make sense." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(0) === \"Smaller Than or Equal to 12\", 'message: myTest(0) should return \"Smaller Than or Equal to 12\"');", "assert(myTest(11) === \"Smaller Than or Equal to 12\", 'message: myTest(11) should return \"Smaller Than or Equal to 12\"');", @@ -2721,7 +2722,7 @@ "

Instructions

", "Combine the two if statements into one statement which will return \"Yes\" if val is less than or equal to 50 and greater than or equal to 25. Otherwise, will return \"No\"." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(editor.getValue().match(/&&/g).length === 1, 'message: You should use the && operator once');", "assert(editor.getValue().match(/if/g).length === 1, 'message: You should only have one if statement');", @@ -2779,7 +2780,7 @@ "

Instructions

", "Combine the two if statements into one statement which returns \"Inside\" if val is between 10 and 20, inclusive. Otherwise, return \"Outside\"." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(editor.getValue().match(/\\|\\|/g).length === 1, 'message: You should use the || operator once');", "assert(editor.getValue().match(/if/g).length === 1, 'message: You should only have one if statement');", @@ -2836,7 +2837,7 @@ "

Instructions

", "Combine the if statements into a single statement." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(editor.getValue().match(/if/g).length === 1, 'message: You should only have one if statement');", "assert(/else/g.test(editor.getValue()), 'message: You should use an else statement');", @@ -2894,7 +2895,7 @@ "
if (num > 15) {
return \"Bigger then 15\";
} else if (num < 5) {
return \"Smaller than 5\";
} else {
return \"Between 5 and 15\";
}
", "

Instructions

Convert the logic to use else if statements." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(editor.getValue().match(/else/g).length > 1, 'message: You should have at least two else statements');", "assert(editor.getValue().match(/if/g).length > 1, 'message: You should have at least two if statements');", @@ -2950,7 +2951,7 @@ "Write chained if/else if statements to fulfill the following conditions:", "num < 5 - return \"Tiny\"
num < 10 - return \"Small\"
num < 15 - return \"Medium\"
num < 20 - return \"Large\"
num >= 20 - return \"Huge\"" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(editor.getValue().match(/else/g).length > 3, 'message: You should have at least four else statements');", "assert(editor.getValue().match(/if/g).length > 3, 'message: You should have at least four if statements');", @@ -3010,7 +3011,7 @@ "
StrokesReturn
1\"Hole-in-one!\"
<= par - 2\"Eagle\"
par - 1\"Birdie\"
par\"Par\"
par + 1\"Bogey\"
par + 2\"Double Bogey\"
>= par + 3\"Go Home!\"
", "par and strokes will always be numeric and positive." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(golfScore(4, 1) === \"Hole-in-one!\", 'message: golfScore(4, 1) should return \"Hole-in-one!\"');", "assert(golfScore(4, 2) === \"Eagle\", 'message: golfScore(4, 2) should return \"Eagle\"');", @@ -3083,7 +3084,7 @@ "

Instructions

", "Write a switch statement to set answer for the following conditions:
1 - \"alpha\"
2 - \"beta\"
3 - \"gamma\"
4 - \"delta\"" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(1) === \"alpha\", 'message: myTest(1) should have a value of \"alpha\"');", "assert(myTest(2) === \"beta\", 'message: myTest(2) should have a value of \"beta\"');", @@ -3145,7 +3146,7 @@ "

Instructions

", "Write a switch statement to set answer for the following conditions:
\"a\" - \"apple\"
\"b\" - \"bird\"
\"c\" - \"cat\"
default - \"stuff\"" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(\"a\") === \"apple\", 'message: myTest(\"a\") should have a value of \"apple\"');", "assert(myTest(\"b\") === \"bird\", 'message: myTest(\"b\") should have a value of \"bird\"');", @@ -3210,7 +3211,7 @@ "Note", "You will need to have a case statement for each number in the range." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(myTest(1) === \"Low\", 'message: myTest(1) should return \"Low\"');", "assert(myTest(2) === \"Low\", 'message: myTest(2) should return \"Low\"');", @@ -3282,7 +3283,7 @@ "

Instructions

", "Change the chained if/if else statements into a switch statement." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(!/else/g.test(editor.getValue()), 'message: You should not use any else statements');", "assert(!/if/g.test(editor.getValue()), 'message: You should not use any if statements');", @@ -3363,7 +3364,7 @@ "

Instructions

", "Fix the function isLess to remove the if/else statements." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(isLess(10,15) === true, 'message: isLess(10,15) should return true');", "assert(isLess(15, 10) === false, 'message: isLess(15,10) should return true');", @@ -3407,7 +3408,7 @@ "

Instructions

", "Modify the function abTest so that if a or b are less than 0 the function will immediately exit with a value of undefined." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof abTest(2,2) === 'number' , 'message: abTest(2,2) should return a number');", "assert(abTest(2,2) === 8 , 'message: abTest(2,2) should return 8');", @@ -3461,7 +3462,7 @@ "Example Output", "-3 Hold
5 Bet" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert((function(){ count = 0; cc(2);cc(3);cc(4);cc(5);var out = cc(6); if(out === \"5 Bet\") {return true;} return false; })(), 'message: Cards Sequence 2, 3, 4, 5, 6 should return \"5 Bet\"');", "assert((function(){ count = 0; cc(7);cc(8);var out = cc(9); if(out === \"0 Hold\") {return true;} return false; })(), 'message: Cards Sequence 7, 8, 9 should return \"0 Hold\"');", @@ -3573,7 +3574,7 @@ "

Instructions

", "Read the values of the properties hat and shirt of testObj using dot notation." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof hatValue === 'string' , 'message: hatValue should be a string');", "assert(hatValue === 'ballcap' , 'message: The value of hatValue should be \"ballcap\"');", @@ -3625,7 +3626,7 @@ "

Instructions

", "Read the values of the properties \"an entree\" and \"the drink\" of testObj using bracket notation." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof entreeValue === 'string' , 'message: entreeValue should be a string');", "assert(entreeValue === 'hamburger' , 'message: The value of entreeValue should be \"hamburger\"');", @@ -3677,7 +3678,7 @@ "

Instructions

", "Use the playerNumber variable to lookup player 16 in testObj using bracket notation." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(typeof playerNumber === 'number', 'message: playerNumber should be a number');", "assert(typeof player === 'string', 'message: The variable player should be a string');", @@ -3877,7 +3878,7 @@ "

Instructions

", "Convert the switch statement into a lookup table called lookup. Use it to lookup val and return the associated string." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(numberLookup(0) === 'zero', 'message: numberLookup(0) should equal \"zero\"');", "assert(numberLookup(1) === 'one', 'message: numberLookup(1) should equal \"one\"');", @@ -3975,6 +3976,7 @@ "

Instructions

", " Modify function checkObj to test myObj for checkProp. If the property is found, return that property's value. If not return \"Not Found\"." ], + "releasedOn": "January 1, 2016", "tests": [ "assert(checkObj(\"gift\") === \"pony\", 'message: checkObj(\"gift\") should return \"pony\".');", "assert(checkObj(\"pet\") === \"kitten\", 'message: checkObj(\"gift\") should return \"kitten\".');", @@ -4028,7 +4030,7 @@ "

Instructions

", "Add a new album to the myMusic JSON object. Add artist and title strings, release_year year, and a formats array of strings." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(Array.isArray(myMusic), 'message: myMusic should be an array');", "assert(myMusic.length > 1, 'message: myMusic should have at least two elements');", @@ -4104,7 +4106,7 @@ "

Instructions

", "Access the myStorage JSON object to retrieve the contents of the glove box. Only use object notation for properties with a space in their name." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(gloveBoxContents === \"maps\", 'message: gloveBoxContents should equal \"maps\"');", "assert(/=\\s*myStorage\\.car\\.inside\\[([\"'])glove box\\1\\]/.test(editor.getValue()), 'message: Use dot and bracket notation to access myStorage');" @@ -4163,7 +4165,7 @@ "

Instructions

", "Retrieve the second tree using object dot and array bracket notation." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(secondTree === \"pine\", 'message: secondTree should equal \"pine\"');", "assert(/=\\s*myPlants\\[1\\].list\\[1\\]/.test(editor.getValue()), 'message: Use dot and bracket notation to access myPlants');" @@ -4214,7 +4216,7 @@ "description": [ "Modify the contents of a JSON object" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(1===1, 'message: message here');" ], @@ -4249,7 +4251,7 @@ "If value is blank, delete that prop.", "Always return the entire collection object." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "collection = collectionCopy; assert(update(5439, \"artist\", \"ABBA\")[5439][\"artist\"] === \"ABBA\", 'message: After update(5439, \"artist\", \"ABBA\"), artist should be \"ABBA\"');", "update(2548, \"artist\", \"\"); assert(!collection[2548].hasOwnProperty(\"artist\"), 'message: After update(2548, \"artist\", \"\"), artist should not be set');", @@ -4478,7 +4480,7 @@ "

Instructions

", "Create a variable total. Use a for loop to add each element of myArr to total." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(total !== 'undefined', 'message: total should be defined');", "assert(total === 20, 'message: total should equal 20');", @@ -4529,7 +4531,7 @@ "

Instructions

", "Modify function multiplyAll so that it multiplies product by each number in the subarrays of arr" ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(multiplyAll([[1],[2],[3]]) === 6, 'message: multiplyAll([[1],[2],[3]]); should return 6');", "assert(multiplyAll([[1,2],[3,4],[5,6,7]]) === 5040, 'message: multiplyAll([[1,2],[3,4],[5,6,7]]) should return 5040');", @@ -4612,7 +4614,7 @@ "Write a function which takes a ROT13 encoded string as input and returns a decoded string. All letters will be uppercase. Do not transform any non-alphabetic character (IE: spaces, punctiation), but do pass them on.", "The provided code transforms the input into an array for you, codeArr. Place the decoded values into the decodedArr array where the provided code will transform it back into a string." ], - "releasedOn": "11/27/2015", + "releasedOn": "January 1, 2016", "tests": [ "assert(rot13(\"SERR PBQR PNZC\") === \"FREE CODE CAMP\", 'message: rot13(\"SERR PBQR PNZC\") should decode to \"FREE CODE CAMP\"');", "assert(rot13(\"SERR CVMMN!\") === \"FREE PIZZA!\", 'message: rot13(\"SERR CVMMN!\") should decode to \"FREE PIZZA!\"');", @@ -5580,4 +5582,4 @@ "challengeType": "0" } ] -} \ No newline at end of file +}