Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Interactive JavaScript tutorial on closures and continuations (nathansjslessons.appspot.com)
6 points by nwhitehead on July 20, 2011 | hide | past | favorite | 7 comments


I finished it yesterday, got stuck for a while in the Asynchonous Callbacks exercise. It wasn't completely clear to me what you wanted.

I went back today and saw that you changed the exercise and description.

"Define a function named doStuffAsync that takes one argument callback, that reads the contents of the file "passwords", appends "OWNED" and writes the results to file "world.txt", then calls callback. Remember, read doesn't return the file contents directly."

From the description shown above, It wasn't clear that you wanted world.txt to contain the content of 'passwords' plus 'OWNED' appended.


I'll reword it, I agree that it is confusing still.


Aside from that one, everything else was very clear and helpful. I've read about closures a few times, but don't think I really got it until finishing your exercises. Thanks!


Just put this online, try it out and let me know if you see any problems. Kudos to whoever finishes first!


I enjoyed it, now understand clojures better, and had never heard of continuation-passing style (though I got the hang of it after a bit). Thanks! I was impressed!


Err, oops. Closures, not clojures.


Thanks, this is a wonderful article.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: