Skip to content

Closure vs function factory #375

Closed
Closed
@dcopp

Description

@dcopp

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Chapter: javascript-101Removed, since https://github.com/jquery/learn.jquery.com/pull/622

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions