Skip to content

devleague/Challenge-Multiples-of-3-and-5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiples of 3 and 5

Total alerts

Your Mission

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.

Write your code in the body of the sumOfAMultiple function in your multiples.js file so that the tests pass. The function will return the sum of all the multiples of 3 or 5 below n.

There are 4 tests in multiples-spec.js, once your first two tests pass, uncomment the last two and fill in the correct result.

Getting Started

  1. Clone this repository
  2. Run the command: npm install
  3. Open this repository in your text editor of your choice.
  4. Your work will be done in the file named: multiples.js
  5. There are tests in place to check your work. To run these tests, run the command: npm test
  6. Once you have two tests passing, open the test spec file multiples_spec.js and un-comment the last two tests.
  7. These last two tests were written incorrectly, fix them!

From Project Euler Problem 1

About

Multiples of 3 and 5 - From Project Euler Problem 1

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published