I do a for loop and would like to get it well aligned.
for(var i=7;i<14; i++){ console.log( i ) }
I get
7
8
9
10
11
12
13
I want
07
08
09
10
11
12
13
Is there a built in way to do that ?
Without cascading testing such i.length=1?'0'+i:i;
)
For now I use .toPrecision(2)
:
5.00
6.00
7.00
8.00
9.00
10.0
11.0
12.0
13.0
14.0
but it is suboptimal as iterations are integers and cannot have ".xx" .