- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do I clear the usage of setInterval()?
The setInterval() method is used evaluate an expression at specified intervals. This function calls function after every duration milliseconds. This goes for unlimited times. Let’s see an example −
It triggers alert(‘Hello’) after every 2000 milliseconds, not only once.
setInterval(function() { alert('Hello');}, 2000);
To clear the usage of setInterval(), use the window.clearInterval() and set the parameter as the ID, like
window.setInterval();
Advertisements