node 循环调用函数

var n = 1
function test(){
    
    
	console.log('调用成功:' + n +' 次')
	n++
}

setInterval(test,1000);//每隔1000毫秒执行一次test函数,执行无数次

在这里插入图片描述

おすすめ

転載: blog.csdn.net/weixin_38946164/article/details/116596267