Not using an arrow function - Functional Programming: Use the map Method to Extract Data from an Array

For this problem:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array

Does this not fit the solution description?

var rating = watchList.map(function (x) {
    var myTitle = x.Title;
    var myRating = x.imdbRating;
    return {myTitle,myRating}
});

I have a code pen of it here:
https://codepen.io/OneSprague/pen/NVBEwm

1 Like

Says it fails on the last requirement:

rating should equal [{"title":"Inception","rating":"8.8"},{"title":"Interstellar","rating":"8.6"},{"title":"The Dark Knight","rating":"9.0"},{"title":"Batman Begins","rating":"8.3"},{"title":"Avatar","rating":"7.9"}].
1 Like

The objects should have properties named title and rating instead of myTitle and myRating.

1 Like

Thank you. I was too focused on the value side to notice that this morning. :frowning: