creates a file for some javascript best practices

- adds two methods of for-loop optimization
- adds the optimized while loop