function repeat(func, times, wait) { var run = function() { let currentTime = 0 let content = arguments[0] return (function next() { setTimeout(() => { func(content) currentTime++ if (currentTime < times) { next() } }, wait) })() } return run }
点赞 评论

相关推荐

牛客网
牛客企业服务