# Create a Timer in JavaScript

> Episode of [Treehouse Quick Tips](https://podistic.com/podcast/treehouse-quick-tips.md) · Published January 29, 2013 · Duration 4:29

- **Listen on Podistic:** https://podistic.com/episode/create-a-timer-in-javascript
- **Video:** https://teamtreehouse.com/library/create-a-timer-in-javascript/download.mp4?itunes=yes (video/mp4)

## About this episode

Sometimes you need to wait a certain amount of time in your program before taking an action. You may also want to repeat an action after a certain length of time.

You can do this using a timeOut and an interval. 

In this example tutorial, the element is replaced using getElementById.
