# Adding "0" to game countdown timer?

**URL:** <https://forum.kirupa.com/t/adding-0-to-game-countdown-timer/247206>\
**Category:** flash\
**Created:** [December 19, 2007, 4:00pm UTC](https://forum.kirupa.com/t/adding-0-to-game-countdown-timer/247206 "2007-12-19T16:00:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yolkSac](https://avatars.discourse-cdn.com/v4/letter/y/4bbf92/32.png) [@yolkSac](https://forum.kirupa.com/u/yolkSac)\
**Post date:** [December 19, 2007, 4:00pm UTC](https://forum.kirupa.com/t/adding-0-to-game-countdown-timer/247206/1 "2007-12-19T16:00:27Z")

</div>

Using this script for a game countdown. Works fine but I would like to add “0” before the single digit #'s to make her look purdy.

Any help?

```auto

//the amount of time in seconds to count down from
timer = 10;
//create a new function
function countDown() {
 //subtract one from timer
timer--;
 //if timer equals zero
 if (timer == 0) {
 gotoAndStop(4);
  //clears the countInt interval
  clearInterval(countInt);
 }
}
//sets countInt to call the countDown function every 1000 milliseconds (1 second)
countInt = setInterval(countDown, 1000);

```
