I've just been in this place before
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
I've just been in this place before
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