+ 2
How to make a function that will be repeated indefinitely? Как сделать функцию которая будет повторяться до бесконечности?
How to make a function that will be repeated indefinitely (in JS)? Как сделать функцию которая будет повторяться до бесконечности (в JS)?
2 Respuestas
+ 2
call the function inside the function.
or you can also use -
set Interval(function_name, 200);
200 is in millisecond.
2000 - 2 second.
Search for recursion if wanna know why/how it works.
+ 1
That is known as Recursion, calling a function inside another one. You need to have a base condition, else it runs indefinitely. Here's an example...
https://code.sololearn.com/cbhHAgTB4xjx/?ref=app