I have file that are uploaded which are formatted like so
MR 1 MR 2 MR 100 MR 200 MR 300
MR 1
MR 2
MR 100
MR 200
MR 300
In simple terms we can written as follows,
for(var i=1;i<=31;i++) i=(i<10) ? '0'+i : i;
//Because most of the time we need this for day, month or amount matters.