Skip to content

Instantly share code, notes, and snippets.

@bambielli
Last active August 15, 2017 03:12
Show Gist options
  • Save bambielli/ff25e37969a170491646a2d57c942aeb to your computer and use it in GitHub Desktop.
Save bambielli/ff25e37969a170491646a2d57c942aeb to your computer and use it in GitHub Desktop.
Worksheet to Practice Map / Filter Transformations on Arrays
const data = [{isSpecial: true, specialPoints: 10}, {isSpecial: false, specialPoints: 5}, {isSpecial: true, specialPoints: 15}];
// Using filter, return a new array of objects that are "special".
const specialArray = '***write code here***'
// Using map, return a new array that doubles the points of all items from the filtered 'specialArray'
const doublySpecialArray = '***write code here***'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment