JavaScript Developer — Hard
Key points
- The Fibonacci function uses a generator to yield values.
- Array.from creates an array from the generator output.
- The Fibonacci sequence starts with 0 and 1.
- The next values are calculated by adding the previous two values.
- The correct output is [0, 1, 1, 2, 3].
Ready to go further?
Related questions
