FCC uses a timeout to protect against infinite loops. If your code takes too long to run it will terminate early to prevent crashing your browser. If you are completely confident that you don’t have an infinite loop, you can turn the protection off.

FYI: all of the challenges have solutions that are efficient enough not to trigger the infinite loop protection.