So I am trying to do the challenge, got stuck and went to the fcc forum to find the answers. Apparently this is an answer:
let rating = watchList.map((x) => {return {title: x.Title , rating: x.imdbRating}});
What i want to know is why did mine not work? I followed the reasoning from other sites that were teaching on how to use the map function and honestly i dont know how that led to the answer above. This is what i got:
rating = watchList.map((title, rating, i, watchList) => {title= watchList[i]["Title"], rating = watchList[i]["imdbRating"]})
This is the site i was using to try and figure out the code:
How did the person or people who figured out the correct answer, know to put x in the () and then use dot notation on it? I am confused