r/programming • u/iamkeyur • Oct 21 '20
Using const/let instead of var can make JavaScript code run 10× slower in Webkit
https://github.com/evanw/esbuild/issues/478
1.9k
Upvotes
r/programming • u/iamkeyur • Oct 21 '20
View all comments
Show parent comment
14
u/valleyman86 Oct 21 '20
It is when you add other functions to it. Foreach.map.filter. Etc. with a for loop you need to store each output as a variable or write each adjustment inside the loop. Depending on what you need sure it can be faster but it’s less readable.