3 ms·
Show HN: Interactive JavaScript tutorial on closures and continuations
- nwhitehead 15y agoJust put this online, try it out and let me know if you see any problems. Kudos to whoever finishes first!
- invalidOrTaken 15y agoI 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!
- invalidOrTaken 15y agoErr, oops. Closures, not clojures.
- sidcool 15y agoThanks, this is a wonderful article.
- frugalfrank 15y agoI 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.
- nwhitehead 15y agoI'll reword it, I agree that it is confusing still.
- frugalfrank 15y agoAside 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!