From b5f5025df297c707bc0aec643dbd3ed8da30e434 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Wed, 28 Oct 2015 10:43:45 -0700 Subject: [PATCH] Fix map iteration and object update copy. --- seed/challenges/basic-javascript.json | 2 +- .../object-oriented-and-functional-programming.json | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 2e55a98f70..12aa9449fa 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -771,7 +771,7 @@ " \"friends\": [\"Free Code Camp Campers\"]", "};", "", - "// Only change code below this line.", + "// Only change code above this line.", "", "(function(z){return z;})(myDog);" ], diff --git a/seed/challenges/object-oriented-and-functional-programming.json b/seed/challenges/object-oriented-and-functional-programming.json index 22d3412193..86e33fd2d2 100644 --- a/seed/challenges/object-oriented-and-functional-programming.json +++ b/seed/challenges/object-oriented-and-functional-programming.json @@ -197,23 +197,23 @@ "Use the map function to add 3 to every value in the variable array." ], "tests":[ - "assert.deepEqual(array, [4,5,6,7,8], 'message: You should add three to each value in the array.');", + "assert.deepEqual(newArray, [4,5,6,7,8], 'message: You should add three to each value in the array.');", "assert(editor.getValue().match(/\\.map\\s*\\(/gi), 'message: You should be making use of the map method.');", "assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\]/gi), 'message: You should only modify the array with map.');" ], "challengeSeed":[ - "var array = [1,2,3,4,5];", + "var oldArray = [1,2,3,4,5];", "", "// Only change code below this line.", "", "", - "", + "var newArray = oldArray;", "", "", "", "// Only change code above this line.", "", - "(function() {return array;})();" + "(function() {return newArray;})();" ], "MDNlinks":[ "Array.map()"