Reverse Arrays with reverse

Reverse Arrays with reverse
0.0 0

#1

Hi,

I wonder what is wrong with my code. Everything is right except this: “You should use the reverse method.”


var array = [1,2,3,4,5,6,7];
var newArray = [];

// Only change code below this line.

newArray = array.reverse(function(val){
  return val;
});

#2

.reverse() take no parameters.


#3

Turn your function inside-out - put the array reverse inside the function.


#4

map and reduce were introduced prior to this waypoint so it makes you think reverse() follows the same syntax.

We get stuck following patterns from previous way points. Even when the correct solution is simpler.