Tell us what’s happening:
it is returning an empty array after i have applied filter on the filteredlist
Your code so far
// Only change code below this line
function myFun(movie){
return parseFloat(movie.imdbRating) >= 8.0;
}
const filteredList = watchList.map(item => ({title : item.Title, rating : item.imdbRating})).filter(myFun)
// Only change code above this line
console.log(filteredList);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Challenge: Use the filter Method to Extract Data from an Array
the are key values for object… it is written like ‘‘Title , imdbRating’’ in case sensitive. but the map part is working fine the filter part is returning empty array in console.
i dont know if i answered what you intend to ask so i apologize