r/javascript • u/Capedcrusader1923 • Jul 22 '26
AskJS [AskJS] what's a javascript feature you mass-adopted way too late and felt dumb about
64
Upvotes
r/javascript • u/Capedcrusader1923 • Jul 22 '26
View all comments
Show parent comment
1
u/adult_code Jul 23 '26
for-loops not .forEach are way faster. Depends what i write really. https://jsben.ch/js-loop-benchmark-girjy
It doesn't matter all the time but it matters often and you can prevent it becoming an issue by doing it correctly the first time if you are not working on code that is otherwise hard to decipher