flatMap - Functional JavaScript - Supercharged

preview_player
Показать описание
In this mini series, Surma introduces you to the various functional methods that JavaScript Arrays have to offer. In this episode: flatMap!

Рекомендации по теме
Комментарии
Автор

Would be nice to see what the result data set might look like

AdamsTaiwan
Автор

I had to listen to this 3 times but I get it now, quite cool, could have used that earlier today

MrTurbo_
Автор

can you also use this to return values for only some items, by returning an empty list? I usually have to use a map followed by a filter to prune empty values.

ehsan_kia
Автор

Hello 👋, why you not show result on in videos? It will be nice... thx for video!

eeqhxly
Автор

Does flatMap removes or keeps duplicates? It's not clear by your example :)

ocramot
Автор

1337
is it going to be faster than doing .reduce(a, c => a.concat) ?
or this just sugar?

GCoda
Автор

Great Vid!!! I know i'm being picky, but please replace those "i" in the last line for something more semantic.

RafaelCouto
Автор

It does not filter out duplicates though, right? So if I had multiple orders with "toothpaste" it would appear multiple times in the result.

dennishein
Автор

MDN warns: Experimental. Expect behavior to change in the future.

is it in some standard yet?

qwiglydee
Автор

I think there is no output, it make me feel so sad in thr end

beckycasandra
Автор

Poorly explained. An example output of items (line 18 from 0:58) would have helped.

danielevans
Автор

Why just not code in scala.js altogether xD

fedes
Автор

Was the point to show people how you flatMap the armchair?

AdamSchelenbergCom