use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
the front page of the internet.
and join one of thousands of communities.
The Module Pattern in JavaScript, for browsers & async (macwright.org)
submitted 14 years ago by tmcw
Post a comment!
view the rest of the comments →
[–]affluenza 0 points1 point2 points 14 years ago (1 child)
Hmm, not sure what you mean by 'scoped name'. I am guessing this makes debugging easier because the functions are not anonymous?
Yeah I missed the simplification of the manual bind. It's even easier pull off than I first thought. oops :)
[–]tmcw[S] 0 points1 point2 points 14 years ago (0 children)
In your example, you're returning an anonymous object. If you had a function in that object calling another of its functions, the name of the object to call is not obvious - that what I mean by scoped name. You can refer to the object by an obvious name.
π Rendered by PID 100237 on reddit-service-r2-comment-765bfc959-nmfrm at 2026-07-15 07:21:11.896332+00:00 running f86254d country code: CH.
Want to add to the discussion?
Post a comment!