Calling a function every 60 seconds

后端 未结 13 2257
情书的邮戳
情书的邮戳 2020-11-22 08:24

Using setTimeout() it is possible to launch a function at a specified time:

setTimeout(function, 60000);

But what if I would l

13条回答
  •  余生分开走
    2020-11-22 09:19

    There are 2 ways to call-

    1. setInterval(function (){ functionName();}, 60000);

    2. setInterval(functionName, 60000);

    above function will call on every 60 seconds.

提交回复
热议问题