Created
April 28, 2016 15:51
-
-
Save ChrisWhealy/80e5d02f76a96d94d35abc19f5545f99 to your computer and use it in GitHub Desktop.
Mindshift: Part 3, sample 8
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
var naughty_and_nice = kids.reduce((acc,k) => { | |
acc.nice += !k.isNaughty; | |
acc.naughty += k.isNaughty; | |
return acc; | |
}, {naughty:0, nice:0}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment