Fix map iteration and object update copy.

This commit is contained in:
Berkeley Martinez
2015-10-28 10:43:45 -07:00
parent de7657bbea
commit b5f5025df2
2 changed files with 5 additions and 5 deletions

View File

@ -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);"
],

View File

@ -197,23 +197,23 @@
"Use the map function to add 3 to every value in the variable <code>array</code>."
],
"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 <code>map</code> method.');",
"assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\]/gi), 'message: You should only modify the array with <code>map</code>.');"
],
"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()"