Skip to content

Instantly share code, notes, and snippets.

@WaldoJeffers
Last active May 27, 2018 10:43
Show Gist options
  • Save WaldoJeffers/5cc6e892c72a185f7502f0b734550ff2 to your computer and use it in GitHub Desktop.
Save WaldoJeffers/5cc6e892c72a185f7502f0b734550ff2 to your computer and use it in GitHub Desktop.
const result = await Promise
.all(numbers.map(isEven)))
.then(results => numbers.filter((_, index) => results[index]))
// [4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment