Iterate over Arrays with map not passing

Tell us what’s happening:

whats wrong with this? why isn’t it passing?

Your code so far

var oldArray = [1,2,3,4,5];

// Only change code below this line.
var newArray ={
  return val + 3;
var newArray = oldArray;

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8.

Link to the challenge:

The last line assigns the same oldArray to newArray, basically undoing the mapping that you’ve done. Remove it.

1 Like