I am trying to write a script that will create numbers in Fibonacci order, I don't understand why this is not working.

```
var output = [];
var n = output.length;
var nextNum = output[n-1] + output[n-2];

function fibo (numQuantity) {
for (var i=1; i<numQuantity ; i++)
{
  if (n>1){ 
  output.push(nextNum);
  console.log(output);
}
else if (n<2)
  {output.push(1);
  console.log(output);}
}
}

```