attempts at project euler problems in javascript