How can I write Fibonacci with for...of? : <p>** How can I write a program that produce Fibonacci with for...of in javascript**</p>

<p>I've tried this, and it works well</p>

<pre><code>function createFibonacci(number) {
    var i;
    var fib = []; // Initialize array!

    fib[0] = 0;
    fib[1] = 1;
    for (i = 2; i &lt;= number; i++) {
      // Next fibonacci number = previous + one before previous
      // Translated to JavaScript:
      fib[i] = fib[i - 2] + fib[i - 1];
      console.log(fib[i]);
    }
}

createFibonacci(8);
</code></pre>

<p>But I'm wondering if it is possible to write it with <strong>for..of</strong>, is there any way to do this?</p>
