Notes and example implementations of design patterns in JavaScript