I have the loop structured like this. When I try to preview it or open it in debug it wont load.
Do you realize what you are doing here? Everytime you call the function it calls itself 90 more times. Each of those 90 calls will call itself 90 more times, so 8,100 times so far, and will go on for infinity.
This is why your browser will lag then crash.
If you put a for loop by itself it will run every tick. Tick being dependent on framerate, but that could be between 40-60 times per second. So it will repeat on its own.
If you want less than that then use every X seconds or put it in the function like you have it, just don't have it call itself for eternity.