Closed lxe closed 6 years ago
The IIFE case can’t return from the enclosing function, and creates an extra frame on the stack (ie, if an error is thrown), and var
s defined within it wouldn’t be available outside the expression.
Thanks for the explanation @ljharb I ... didn't think of the block scope preservation.
Can be expressed as
Right?