Flatten array with JavaScript reduce function 0 points · submitted Jun 2020 by u/var_ya 2 comments · 40% upvoted · source · other discussions
For the millionth time, stop generating a million intermediate array copies for a simple flatten operation.
This is part of the language now [1][2], but even for polyfill you should be using a stack based flatten.