# Countdown timer problem

**URL:** <https://forum.kirupa.com/t/countdown-timer-problem/280660>\
**Category:** Uncategorized\
**Created:** [January 30, 2009, 1:08am UTC](https://forum.kirupa.com/t/countdown-timer-problem/280660 "2009-01-30T01:08:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![uni](https://avatars.discourse-cdn.com/v4/letter/u/9d8465/32.png) [@uni](https://forum.kirupa.com/u/uni)\
**Post date:** [January 30, 2009, 1:08am UTC](https://forum.kirupa.com/t/countdown-timer-problem/280660/1 "2009-01-30T01:08:50Z")

</div>

hello there,  
I’m trying to create a countdown timer from 42 to 0,  
that work pretty good, but I want to make more space between the the number 1 0 something like this

this is my code:

```auto

timer = 42;

countdown = function(){
     timer--;
     if(timer==0){
          clearInterval(countdownInterval);
     }
}

countdownInterval = setInterval(countdown,1000);

```

how i can make it?
