The best way to write JavaScript