Re:How JavaScript Works: deep dive into call, apply, and bind
by hajile on Friday July 09, 2021 @06:36PM
(#27789287)
That creates an entire extra list of garbage.
[ Parent
| on HN ]
Re:How JavaScript Works: deep dive into call, apply, and bind
by lhorie on Friday July 09, 2021 @07:28PM
(#27789635)
const mapNodeList = (...nodeList) => nodeList.map(myFn);
mapNodeList(...$nodeList)
Garbage collection really isn't the biggest of concerns here considering this code is susceptible to a stack overflow...
Re:How JavaScript Works: deep dive into call, apply, and bind
by chrisseaton on Friday July 09, 2021 @06:42PM
(#27789337)
Doesn’t the compiler optimise it away?