Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
transducer__medium
const data = ['apple', 'banana', 'orange', 'strawberry']
const isNotBerry = fruit => !/berry/i.test(fruit)
const fruitsThatArentBerries = data.filter(capitalizeFirst)
const data = ['apple', 'banana', 'orange', 'strawberry']
const capitalizeFirst = text => text.slice(0, 1).toUpperCase() + text.slice(1)
const fruits = data.map(capitalizeFirst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment