(Cycles) Why not load the page?

The page with this code not loaded. Chrome says that an error occurred during the download. I think it's because of the cycle in the cycle, because without it the rest of the page works, but as soon as you insert this part, the page stops to load. What could be the reason and is there a error code? Thank you

while (timeFlag == 1) { 


 while (clickFlag == 1) { 

 if (timeFlag == 0) { 




 clickFlag = 1; 

June 27th 19 at 14:59
1 answer
June 27th 19 at 15:01
The eternal cycle, perhaps both because.
It is necessary to control the time for such logic. To do the interval and limit to N updates per second
How to limit to n repetitions per second. I set the sleep function. - nikita.Stracke commented on June 27th 19 at 15:04

Find more questions by tags JavaScript