javascript euler problems