JavaScript Design Patten: Strategy