Giter Site home page Giter Site logo

challenge-even-fibonacci-numbers's Introduction

Even Fibonacci Numbers

Challenge 2

Each new number in the Fibonacci sequence is generated by adding the previous two Fibonacci numbers. For example by starting with the numbers 1 and 2 being the first and second numbers in the Fibonacci sequence, the first 10 numbers in the Fibonacci sequence looks like this:

1, 2, 3, 5, 8, 13, 21, 34, 55, 89

The Exercise You will be given a stub function in the file even_fib_nums.js. This function accepts one argument, maxFibValue which is a Number.

Remember, maxFibValue is the max value of a fibonacci number, it is NOT the Nth fibonacci number in the sequence.

You goal will be to sum up all the *Even Numbers that are less than or equal to, but does not exceed, the maxFibValue given to you.

Getting Started

  1. Fork and Clone this repository
  2. To install all dependecies, run the command: npm install
  3. Your work will be done in the file named: even_fib_nums.js
  4. Run your test with the command: npm test
  5. When you are done with the first 2 tests, un-skip the other by deleting .skip.
  6. The third test is broken, fix it!

Caveats

Remember, n is not how many numbers in the fibonacci sequence, it is the max value, the last term in a fibonacci sequence where you will then add up all even numbers.

references

Fibonacci on Wikipedia

The Fibonacci Sequence: Nature's Code on YouTube

From Project Euler Problem 2

challenge-even-fibonacci-numbers's People

Contributors

jaywon avatar joekarlsson avatar sgnl avatar theremix avatar

Watchers

 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.