3 ms·
Probably, you can optimize .forEach even more. You can get 'arr.length' and 'let i = 0' outside of the for-loop. It could be faster according to this test: htt
by qwermike 9y ago
Probably, you can optimize .forEach even more. You can get 'arr.length' and 'let i = 0' outside of the for-loop.
It could be faster according to this test:
https://jsperf.com/extended-array-loops-performance https://jsperf.com/extended-array-loops-performance