first few problems of euler in javascript