6 kyu

Fibonacci Generator Function

Description:

This is a simple Kata to test your knowledge of generators. You will create a generator function which produces a fibonacci sequence. The first number in the sequence is 0. The next number in the sequence is 1. Each subsequent number is the summation of the previous two numbers. The next number after 1 would be 1 because 0 + 1 = 1. The next number would be 2 because 1 + 1 = 2.

The fibonacci sequence starts at zero, calling fib.next() should step through the next number in the fibonacci sequence and fib.next().value will step through and produce the value.

Refactoring

Stats:

CreatedFeb 16, 2017
PublishedFeb 16, 2017
Warriors Trained660
Total Skips4
Total Code Submissions764
Total Times Completed329
JavaScript Completions329
Total Stars14
% of votes with a positive feedback rating92% of 102
Total "Very Satisfied" Votes89
Total "Somewhat Satisfied" Votes10
Total "Not Satisfied" Votes3
Total Rank Assessments10
Average Assessed Rank
6 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • vy1701 Avatar
  • Voile Avatar
Ad