Learning JavaScript Design Patterns Example