I was working on the “Functional Programming: Use the filter Method to Extract Data from an Array” challenge and placed filter() on it’s own line. The check for " Your code should use the filter
method." failed. It succeeded as soon as I just deleted the whitespace and put everything on one line.
This fails…
var filteredList = watchList.
filter(value => value.imdbRating > 8).
map(value => ({title: value.Title, rating: value.imdbRating}));
but this succeeds…
var filteredList = watchList.filter(value => value.imdbRating > 8).map(value => ({title: value.Title, rating: value.imdbRating}));