Map() question For Loop Problem

I am now currently working on Functional Programming. Even though I haven’t used the for loop but still tells me that I have used for loop. Here is my code

let rating = watchList.map(function(x){
  return {'title': x.Title, 'rating': x.imdbRating};
 });

And here is the question
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array

Can anyone tell me what is wrong here ?
Thank You.

It’s working for me when I copy/paste your solution and REPLACE the original version. Did you just comment out the original for loop, perhaps? When I did that, the test failed.

Yes, I did that @vipatron.

So it passes now that you’ve deleted the commented code?

And after Deleting the for loop I get the result. Thanks a lot @vipatron.

1 Like

Go ahead and mark my original comment as the solution then. Have a good day!