Is there a way to pass Infinity into flatmap()? Or would you need to do a Array.flatMap(itme => item).flat(Infinity) roundabout to get that effect? (I'm not even sure if this would be particularly useful in any scenario)
Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
Is there a way to pass
Infinity
intoflatmap()
? Or would you need to do aArray.flatMap(itme => item).flat(Infinity)
roundabout to get that effect? (I'm not even sure if this would be particularly useful in any scenario)Not that I've seen. I think the way to do it would be the second example you listed.