Fibonacci

Ruby

Create a recursive method called fibonacci that accepts a number. The fibonacci method will return an array starting from 2 and run x number of times provided. Your method should include [0, 1] by default to start the sequence. The next number is the sum of the previous 2 numbers.

fibonacci(10) # => [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
def fibonacci(n) end
< >