diff --git a/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json b/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json index f80a377680..e5575c1b51 100644 --- a/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json +++ b/seed/challenges/01-front-end-development-certification/object-oriented-and-functional-programming.json @@ -305,7 +305,7 @@ "title": "Iterate over Arrays with .map", "description": [ "The map method is a convenient way to iterate through arrays. Here's an example usage:", - "
var timesFour = oldArray.map(function(val){
  return val * 4;
});
", + "
var oldArray = [1, 2, 3];
var timesFour = oldArray.map(function(val){
  return val * 4;
});
console.log(timesFour); // returns [4, 8, 12]
console.log(oldArray); // returns [1, 2, 3]
", "", "The map method will iterate through every element of the array, creating a new array with values that have been modified by the callback function, and return it. Note that it does not modify the original array.", "In our example the callback only uses the value of the array element (the val argument) but your callback can also include arguments for the index and array being acted on.",