We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
每日一题会在下午四点在交流群集中讨论,五点小程序中更新答案 欢迎大家在下方发表自己的优质见解 二维码加载失败可点击 小程序二维码
每日一题会在下午四点在交流群集中讨论,五点小程序中更新答案 欢迎大家在下方发表自己的优质见解
setTimeout 表示间隔一段时间之后执行一次调用,而 setInterval 则是每间隔一段时间循环调用,直至 clearInterval 结束。
内存方面,setTimeout 只需要进入一次队列,不会造成内存溢出,setInterval 因为不计算代码时间,有可能通知执行多次代码,导致内存溢出。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
扫描下方二维码,收藏关注,及时获取答案以及详细解析,同时可解锁800+道前端面试题。
setTimeout 与 setInterval
setTimeout 表示间隔一段时间之后执行一次调用,而 setInterval 则是每间隔一段时间循环调用,直至 clearInterval 结束。
内存方面,setTimeout 只需要进入一次队列,不会造成内存溢出,setInterval 因为不计算代码时间,有可能通知执行多次代码,导致内存溢出。
The text was updated successfully, but these errors were encountered: