I am trying to convert an arrow function into a regular function
this piece of code:
let rating = watchList.map( (item) => ({"title":item["Title"], "rating":item["imdbRating"]}) )
like so:
let rating = watchList.map( function (item) {
"title":item["Title"], "rating":item["imdbRating"]
})
while I thought these two are equivalent, I am getting this message
SyntaxError: unknown: Unexpected token, expected