Created
May 20, 2017 21:33
-
-
Save himynameisdave/c246c4474e0c973af7b8875208eacdde to your computer and use it in GitHub Desktop.
Reduce your fears about .reduce() - twentySomethingsLongFullNames.js
This file contains hidden or 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 isInTwenties = user => user.age >= 20 && user.age < 30; | |
const makeFullName = user => `${user.firstName} ${user.lastName}`; | |
const isAtLeastTenChars = fullName => fullName.length >= 10; | |
const twentySomethingsLongFullNames = users.filter(isInTwenties) | |
.map(makeFullName) | |
.filter(isAtLeastTenChars); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment