Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

map & filter

const filteredList = watchList.map(movie => ({
  title : movie['Title'],
  rating: movie["imdbRating"]
})
).filter(movie => {
  return parseFloat(movie.rating) >= 8.0;
})
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #map #filter
ADD COMMENT
Topic
Name
2+8 =