I used this method to solve the problem but it came out " Your code should return the correct output after modifying the watchList object."
I don’t really understand why?
Here’s the link.
function getRating(watchList) {
// Only change code below this line
let firList = watchList.filter(item => item.Director == "Christopher Nolan");
let secList = firList.map(item => Number(item.imdbRating));
let averageRating = secList.reduce((ave, rating) => ave + rating / 4, 0)
// Only change code above this line
return averageRating;
}