2 ms·
> JavaScript (when using `var`) I would argue that var is an entirely different issue. If variables last the entire function then it's far less confusing to s
by Dylan16807 3y ago
> JavaScript (when using `var`)
I would argue that var is an entirely different issue. If variables last the entire function then it's far less confusing to see closures using the final value. After exiting the loop the final value is right there, still assigned to the variable. You can print it directly with no closures needed.