Project Euler solutions in JavaScript/ECMAScript