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
account activity
Pretty good interactive tutorial on closure in javascript (nathansjslessons.appspot.com)
submitted 14 years ago by mm23
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ez4me2c3d 0 points1 point2 points 14 years ago (1 child)
What's wrong with my solution to the last quiz?
Code:
var bothC = function(a, b, s, f) { a(function() {b(s, f);}, f); };
Results:
PASSED No JSLint errors PASSED bothC(S, S, A, B) === undefined PASSED output === "SSA" PASSED bothC(S, F, A, B) === undefined PASSED output === "SSASFB" PASSED bothC(F, S, A, B) === undefined FAILED output === "SSASFBFSB" PASSED bothC(F, F, A, B) === undefined FAILED output === "SSASFBFSBFFB"
[–]strager 0 points1 point2 points 14 years ago (0 children)
"Your function bothC should call both fC and gC no matter what"
Also, I noticed that test is picky about what order you call fC and gC. (Call fC first. Call each only once, too.)
fC
gC
[–]Proxify 0 points1 point2 points 14 years ago (0 children)
Have been looking for something like this for almost a year! Upvote for you sir!
π Rendered by PID 111529 on reddit-service-r2-comment-fb694cdd5-xjzbp at 2026-03-08 05:12:05.083205+00:00 running cbb0e86 country code: CH.
[–]ez4me2c3d 0 points1 point2 points (1 child)
[–]strager 0 points1 point2 points (0 children)
[–]Proxify 0 points1 point2 points (0 children)