I used the map here to loop over the watchList array and get some values for the ratings array in the callback function when I did not insert return before the object it shows an error why is that
A map takes a callback function. The input to that callback function is an old array element. The return value of the callback function will be the new array value.
Nope. There should always be a return value. Sometimes the return statement is implicit instead of explicit, but a map callback should always have a return value.