Git Product home page Git Product logo

challenge-multiples-of-3-and-5's Introduction

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

challenge-multiples-of-3-and-5's People

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.