Sum All Odd Fibonacci Numbers - Freeze


Hi there!

I am currently solving the front-end algorithms for the freeCodeCamp certification and I have run into a problem. I have created this solution, which seems to be working in the Google Chrome console, but when plugged into the freeCodeCamp code editor, it seems to freeze the browser. I suspected it may be an infinite loop, but that wouldn’t explain why it works in the console. This is the code:

EDIT: The issue has been solved. Thank you!


How did you solve it?