Skip to content

Instantly share code, notes, and snippets.

@nathan-lapinski
Created June 4, 2018 11:47
Show Gist options
  • Save nathan-lapinski/32eedf8db05a704b541295a91072b276 to your computer and use it in GitHub Desktop.
Save nathan-lapinski/32eedf8db05a704b541295a91072b276 to your computer and use it in GitHub Desktop.
Array composition
const arr = [1,2,3,4,5,6];
const composedArr = arr.map(x => x + 1).filter(y => y % 2 === 0); // [2,4,6];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment