Skip to content
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

Question 4 - the definition of a closure is incorrect #90

Open
vibecode opened this issue Feb 17, 2020 · 1 comment
Open

Question 4 - the definition of a closure is incorrect #90

vibecode opened this issue Feb 17, 2020 · 1 comment

Comments

@vibecode
Copy link

I believe the definition of a closure as "a function defined inside another function..." is not particularly correct. A closure is a function + lexical environment it's bound to. It doesn't necessary require an outer function.

See also https://stackoverflow.com/questions/50529400/is-the-definition-of-javascript-closures-on-mdn-wrong

@vibecode vibecode changed the title Question 4 Question 4 - the definition of a closure is incorrect Feb 17, 2020
@ganqqwerty
Copy link
Owner

You're right, I like Kyle Simpson definition much more after I read his books. May I ask you to create a pullrequest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants