3 ms·
I think one could argue that function scoping is no longer necessary - there's nothing you would do with function scoping that you couldn't do with lexical-bloc
by pfooti 11y ago
I think one could argue that function scoping is no longer necessary - there's nothing you would do with function scoping that you couldn't do with lexical-block scoping, since with lexical scoping, you can still declare variables at a function block scope.
The only real benefit I can think of from function scoping is hoisting, reliance upon which strikes me as an antipattern.