As part of the Odin Projects course we were given a challenge to solve some of the project euler questions. I have solved both questions 1 & 2 and provided my code. Links to both the Odin Project and Project Euler are below.
https://www.theodinproject.com/courses/web-development-101/lessons/javascript-basics