Skip to content

Closure vs function factory #375

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

Closed
dcopp opened this issue May 23, 2013 · 0 comments
Closed

Closure vs function factory #375

dcopp opened this issue May 23, 2013 · 0 comments
Labels
Chapter: javascript-101 Removed, since https://github.com/jquery/learn.jquery.com/pull/622

Comments

@dcopp
Copy link

dcopp commented May 23, 2013

I read through the EXCELLENT javascript 101 you provided and have one suggestion: under

http://learn.jquery.com/javascript-101/closures/

after the first block of loop code it is stated "Closures can be used to prevent this...". That REALLY threw me for a loop since the anon function in the loop, when invoked, IS a closure. It's just a closure that isn't doing what is wanted.

It may have been less confusing if the text read "A function factory returning the closure may be used to prevent this." It's not the fact that a closure was used, but how it was used.

I am really impressed by the tutorial. Excellent work!

dcopp

@arthurvr arthurvr added the Chapter: javascript-101 Removed, since https://github.com/jquery/learn.jquery.com/pull/622 label Jan 20, 2015
Krinkle pushed a commit that referenced this issue Apr 9, 2024
Fixes gh-257
Fixes gh-20
Fixes gh-58
Fixes gh-70
Fixes gh-375
Fixes gh-565
Fixes gh-615
Closes gh-622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chapter: javascript-101 Removed, since https://github.com/jquery/learn.jquery.com/pull/622
Development

No branches or pull requests

2 participants