Project Euler JS Problems