Nth number of fibonacci's sequence
Returns the nth number of fibonacci's sequence.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
n |
Number
|
The nth position in fibonacci's sequence |
Example
var fibonacci = require('path-to-algorithms/src/others/fibonacci').fibonacci;
var nth = fibonacci(20);
console.log(nth); // 6765