# Force two digit numbers

**URL:** <https://forum.kirupa.com/t/force-two-digit-numbers/167061>\
**Category:** flash\
**Created:** [October 25, 2005, 3:59am UTC](https://forum.kirupa.com/t/force-two-digit-numbers/167061 "2005-10-25T03:59:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jedhu0920](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jedhu0920/32/905_2.png) [@jedhu0920](https://forum.kirupa.com/u/jedhu0920)\
**Post date:** [October 25, 2005, 3:59am UTC](https://forum.kirupa.com/t/force-two-digit-numbers/167061/1 "2005-10-25T03:59:03Z")

</div>

Is there any way to force a two digit number with actionscript? Say, for instance, that I have a for loop that traces the numbers 1 through 9. In the output panel, I only get one digit numbers: 1, 2, 3,…9. Is there any way to make the trace output be 01, 02, 03,…09?

Obviously I could use an if statement to manually add zeros to all numbers that are less than 10, but is there a cleaner way to do it?
