...

/

Challenge: Create a Fibonacci Iterator

Challenge: Create a Fibonacci Iterator

Create a Fibonacci iterator.

Problem statement

In this problem, you’re required to produce the numbers in the Fibonacci series. Write an iterator class Fibonacci that takes a number n and creates the first n Fibonacci numbers.

This the Fibonacci sequence: 0,1,1,2,3,5,8,13,21,34,...0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... ...

svg viewer