Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const double = x => x * 2
- const getLength = string => string.length
- const map = (collection, fn) => collection.map(fn)
- const messages = ['Hello', 'Bye']
- const doubleLengths = map(map(messages, getLength), double)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement