Skip to content

Instantly share code, notes, and snippets.

@rrmdn
Created February 7, 2017 01:30
Show Gist options
  • Select an option

  • Save rrmdn/d1c06ed0f4589ebf4f388eb472c2c155 to your computer and use it in GitHub Desktop.

Select an option

Save rrmdn/d1c06ed0f4589ebf4f388eb472c2c155 to your computer and use it in GitHub Desktop.
const availableProducts = products.filter(product => (
(product.quantity !== 0) &&
(product.metadata.status === 'good')
));
const damagedProducts = products.filter(product => (
(product.quantity !== 0) &&
(product.metadata.status === 'damaged')
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment