-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blocks description is misleading #84
Comments
You're absolutely right. Blocks don't cover all the situations to replace IIFEs, but they should be considered first. Maybe I can update the example to better reflect this - I'll think about a good way to phrase it. |
Where are the latest comments |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Blocks have been in js for a long time - they’re the reason
breaks since it is interpreted as
That being said, blocks haven’t been very useful before due to lack of block scope, but that’s not different than the earlier discussion of
let
andconst
Blocks don’t really do the same thing as IIFEs in enough situations to call then replacements I think. They will not limit
var
declarations, but more importantly they won't limitfunction
declarations which will be hoisted into a higher scopeThe text was updated successfully, but these errors were encountered: