I imagine it can be more convinent sometimes to have a function-scoped variable. But even then we're probably talking about quickly hacking things together.
Out of the blue I cannot give you a production example of "a var variable would be better here"
33
u/[deleted] May 28 '19
VSCode masterrace but WebStorm is right here. (Modern) JS shouldn't use var when not explicitly needed.