Calculates the nth Fibonacci number.
The nth Fibonacci number.
An error if n is not a non-negative integer.
n
The index of the Fibonacci number to calculate. Must be a non-negative integer.
Generated using TypeDoc
Calculates the nth Fibonacci number.
Returns
The nth Fibonacci number.
Throws
An error if
n
is not a non-negative integer.