Much of both sides of this argument are opinion, but wrt this comment.
> ... no function call overhead.
This code has more function calls. O(n) vs 3 for the original
> ... no function call overhead.
This code has more function calls. O(n) vs 3 for the original
I'm going to take my own advice and go back to work :)
If I run this in the JS console I get two anonymous stack frames. The first being the console itself.
[1, 2, 3].filter(x => [][0]())