Project Euler - JavaScript edition