When Fruit Salad Is Just Concatenation
const mix = (fruits, bowl = '') => fruits.reduce( (content, fruit) => content + fruit.type , bowl) /* This yields a String ` 🍎 🍌 🟢 🍉 🍊 🍓 ` because we're just concatenating these guys together. */ const fruitSalad = mix(fruitsWithoutChilis) // But is it really a fruit salad? Let's check... console.log(fruitSalad === ` 🍎 🍌 🟢 🍉 🍊 🍓 ` ? '🥗' : '😱') // 🥗, yay!
A dark-themed code screenshot defines a JavaScript function that concatenates fruit emojis into a string, then checks whether the result counts as a fruit salad. The joke is that merely joining fruit symbols together does not create an actual salad, though the code celebrates the result anyway. EN: A dark-themed code screenshot defines a JavaScript function that concatenates fruit emojis into a string, then checks whether the result counts as a fruit salad. The joke is that merely joining fruit symbols together does not create an actual salad, though the code celebrates the result anyway.
- @profunctor_io / 1259 2018-08-31
- Type
- image
- Size
- 800×534 · 51.5 KiB
- Mood
- absurd, playful
- Language
- en
- Added