Skip to content

mariags803/fibonaccisequence

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code kata: Fibonacci

Description

The Fibonacci sequence is a series of numbers where the next number is calculates adding the two previous numbers. This sequence begins with two numbers: zero and one. The third number is calculated adding these two numbers (0 + 1). The fourth number is calculated adding the two numbers before it (1 + 1). And so on.

Having a position, the function returns the value that corresponds to that position in the Fibonacci sequence.

Example

// 0,1,1,2,3,5,8,13,21,34,55,89,144

position 0  // => 0
position 1  // => 1
position 2  // => 1
position 3  // => 2
position 10 // => 55

Run project

Install

npm install

Run test

npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published