Open RazvanBugoi opened 5 years ago
//trick is that the breeds of geese are being mixed into the array of birds and the geese variable already represents them. All you have to do is exclude geese from a given array of birds.
function gooseFilter (birds) { var geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"];
// return an array containing all of the strings in the input array except those that match strings in geese var filtered = birds.filter(item => !geese.includes(item))
return filtered;
};
https://www.codewars.com/kata/filter-out-the-geese/train/javascript