JavaScript Design