23 lines
		
	
	
		
			762 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			23 lines
		
	
	
		
			762 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								title: Window clearInterval Method
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								## Window clearInterval Method
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								The 'clearInterval()' method is used to clear a timer set with the 'setInterval()' method.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								```js
							 | 
						||
| 
								 | 
							
								    clearInterval(setInteval_ID); 
							 | 
						||
| 
								 | 
							
								```
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								To be able to use the 'clearInterval()' method, you must use a global variable.
							 | 
						||
| 
								 | 
							
								```js
							 | 
						||
| 
								 | 
							
								    myID = setInterval(function, milliseconds); 
							 | 
						||
| 
								 | 
							
								```
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#### More Information:
							 | 
						||
| 
								 | 
							
								<!-- Please add any articles you think might be helpful to read before writing the article -->
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Documentation: <a href='https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval' target='_blank' rel='nofollow'>MDN</a> 
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Some more examples on <a href='https://www.w3schools.com/jsref/met_win_clearinterval.asp' target='_blank' rel='nofollow'>w3schools</a>
							 |