Skip to content

Instantly share code, notes, and snippets.

@AlfieDarko
Last active August 13, 2018 19:56
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 AlfieDarko/f6a6e5e070e2414fb5cc2f636dd03eb6 to your computer and use it in GitHub Desktop.
Save AlfieDarko/f6a6e5e070e2414fb5cc2f636dd03eb6 to your computer and use it in GitHub Desktop.
function returnFitPlayers(allPlayers, injuredPlayers) {
let result = allPlayers.filter((player) => {
!injuredPlayers.includes(player)
});
return result;
}
// filter through the manUTD team and return players
// that are NOT included in the injuredPlayers array
const fitPlayers = returnFitPlayers(manUTD, InjuredPlayers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment