Unresponsive Script Issue

Unresponsive Script Issue
0

#1

I’m working on the Sum All Odd Fibonacci Numbers challenge and running into an issue.
In the FCC challenge, when I try to specify the loop duration as i<=num I get an unresponsive script error. If I run the same code in the browser console, it works fine. If I sub in a hard-coded value (i<=4) it works in FCC.

function getFibs(num) {
  var fibs = [];
  fibs[0] = 0;
  fibs[1] = 1;
  
  for (var i=2; i<=num; i++) {
    fibs[i] = fibs[i-2] + fibs[i-1];
  }
  return fibs;
}

sumFibs(4);

Anyone have an idea of what’s going on here?


#2

Figured out my problem


#3

How did you fix it? Since mine is giving the same error.


#4

Script is calling sumFibs(), but function is called getFibs()

function getFibs(num) {
// .......
// .......
}
sumFibs(4);