3 ms·
for loops will yield better performance and the result you want to get. If you're trying to log 5 times you shouldn't be wasting memory with allocating an array
by krisdol 10y ago
for loops will yield better performance and the result you want to get. If you're trying to log 5 times you shouldn't be wasting memory with allocating an array or needlessly calling the forEach function or needlessly creating a callback. You're just wasting garbage collection and cpu time with this