[JS test] Fib

by leethelobster

JavaScript

/**
 *
 * Write a function fib() that a takes an integer n and returns the nth fibonacci number. Let's say our fibonacci series is 0-indexed and starts with 0.
 *
 * i.e. 
 * fib(0) = 0
 * fib(1) = 1
 * fib(6) = 8
 * fib(36) = ??
 *
 * The Fibonacci series is a numerical series where each item is the sum of the two previous items. It starts off like this: 0,1,1,2,3,5,8,13,21...
 */