3 ms·
Nitpickery indeed, but that won't work as expected. `fn` can be reused within the loop, depending on the runtime, so all methods will end up calling the same `d
by troels 16y ago
Nitpickery indeed, but that won't work as expected. `fn` can be reused within the loop, depending on the runtime, so all methods will end up calling the same `desk[fn]`.
- warfangle 16y agoYou're right in that it won't work as expected - unless the desk methods are static. In reality, you would probably want to call desk[fn].call(thisContext, arguments);
- deleted 16y ago[deleted]
- sharkbrainguy 16y agoI think you might have misread the code. Each `fn` is bound exactly once, `forEach` is not a loop.
- troels 16y agoTouché