Skip to content

Instantly share code, notes, and snippets.

@lucalanca
Created September 7, 2016 15:35
Show Gist options
  • Save lucalanca/6c42d4efdb10a3bf50a6a891e2df8669 to your computer and use it in GitHub Desktop.
Save lucalanca/6c42d4efdb10a3bf50a6a891e2df8669 to your computer and use it in GitHub Desktop.
# remove falsey elements from array
const compact = (arr) => arr.filter(Boolean)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment