How to write the observer pattern in JavaScript
dottedsquirrel.com