JavaScript examples of the Gang of Four's design patterns