Closures for information hiding function SuperClass() { var data = "private data"; this.method = function() { /* ... */ data /* ... */ }; } no sharing: one method per instance!
JavaScript is concurrent Cooperative concurrency: easier, but not easy! Handlers run sequentially but start concurrently. Shared state 㱺 race conditions 㱺 pain and suffering
task.js: Beautiful concurrency spawn(function*() { var files = yield join(load("foo"), load("bar"), load("baz")); use(files); }); create a task that can be paused pause! http://taskjs.org