title: Infinite Loop Fibonacci JavaScript
body: <p>I've been trying to solve the Fibonacci sequence and tried it with the following approach:</p>
  <pre><code>function fibbi(number) {
      for (let number = 0; number &lt; 10; number++) {
          console.log(fibbi(number));
      }if (number &lt; 2) {
          return number;
      } else {
          return fibbi(number - 1) + fibbi(number - 2);
      }
  }
  fibbi(10);
  </code></pre>
  <p>Through that, I'm running into an infinite loop and I don't really understand why. Could someone walk me through this maybe? If I put the for loop outside of the function and call the function there, it will not run into an infinite loop.</p>
  <p>Edit: Changed function name in else statement</p>