Array methods shorthand
const numbers = [4, 8, 15, 16, 23, 42] const isEven = n => n % 2 === 0 numbers.filter(number => isEven(number)) // ⇒ [4, 8, 16, 42] numbers.filter(isEven) // ⇒ [4, 8, 16, 42]
There is more to learn
Get free previews of my upcoming course materials and other bonus content to help you work smarter. I share tips straight to your inbox once a week. You can read previous mails in the newsletter archive.
Cannot show form because cookie consent was not given.