Force two digit numbers

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?