Last active
August 15, 2017 03:12
-
-
Save bambielli/ff25e37969a170491646a2d57c942aeb to your computer and use it in GitHub Desktop.
Worksheet to Practice Map / Filter Transformations on Arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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