function repeact(str, time, print) { return function (s) { for (let i = 0; i < time; i++) { setTimeout(() => { str(s); }, print * (i + 1)); } }; } const repeatFunc = repeact(console.log, 4, 3000); repeatFunc("helloword");
5 3

相关推荐

04-17 10:16
门头沟学院 Java
小浪_coder:24届很难找了,马上25的都毕业了还有很多没找到的
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务