DEV Community

Discussion on: Demystifying Array.prototype.flat

Collapse
 
laurieontech profile image
Laurie

Depends what the shenanigans are! šŸ™ƒ

And to be honest, Iā€™m surprised so many people expected it to be infinity by default?

Collapse
 
rhymes profile image
rhymes

It make sense, flat(N) means I have to know exactly how many levels of nesting there are. We're lazy, Infinity should have been the default :P