3 Project Euler solutions in javascript