Johannes Rebhan
Jul 28, 2017 · 1 min read

Yeah I forgot to add the jsperf benchmark link. I tried to do as little as possible in the callback function itself. Naturally I used a callback function in the for loop itself, because I don’t like to put a ton of code in my loops as it makes the code less readable and often times less testable too (might not be critical for many JS scripts, but JS is just one language I use).

    Johannes Rebhan

    Written by

    Lead Developer Koch Kommunikation AG (http://koch-k.ch/ ) — tweeting a wild mix of things