Skip to content

Instantly share code, notes, and snippets.

@TatyCat
Created February 14, 2019 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TatyCat/8566e0f4d4589470b6d4fc2919bdfbe2 to your computer and use it in GitHub Desktop.
Save TatyCat/8566e0f4d4589470b6d4fc2919bdfbe2 to your computer and use it in GitHub Desktop.
Freaking Geese - Kata
function gooseFilter (birds) {
var geese = ["African", "Roman Tufted", "Toulouse", "Pilgrim", "Steinbacher"];
//birds array argument is filtered to check if the birds array includes a string that is in geese
//...if it isn't geese, return the string.
let filteredBirds = birds.filter(newBirds => {
return !geese.includes(newBirds)
})
console.log( filteredBirds)
return filteredBirds
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment