Created
February 14, 2019 00:49
-
-
Save TatyCat/8566e0f4d4589470b6d4fc2919bdfbe2 to your computer and use it in GitHub Desktop.
Freaking Geese - Kata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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