Use the map Method to Extract Data from an Array problem with rating var

Tell us what’s happening:

Hi I am not sure why this wouldnt work, can anyone shed some light?
for some reason it returns null, although i believe it is the same as the solution presented.

.

var rating = watchList.map(function (x) { ({
  title: x["Title"],  
  rating: x["imdbRating"],
}) }); 

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36.

Challenge: Use the map Method to Extract Data from an Array

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

the callback of map is not returning anything, the return keyword is missing. implicit return (without using the return keyword) is something that works only with arrow functions

Thanks i had tried to use return, but must have spelt it wrong and got a bit frustrated. i went to sleep and the next day i tried again after looking at your response. it worked.
thank you so much.