I want to write something like this: function f(){ //something setTimeout(f,x); } I'm using setTimeout becouse I want to repeat the function again and again, so I'm afraid of stack overflow. But, what value I ought to write instand of x, if I want to be sure that the code will run at old computers, too, but I want the smallest interval of repeating?
11/7/2019 3:39:46 PM
Dominik Vladař1 Answer
New AnswerYou might want something like: window.requestAnimationFrame(f); This is especially used in animations, where easier to load animations will be loaded faster while intensive animations load slower.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message