An int
cannot have leading zeroes, since they don't have any mathematical meaning.
To store a number, languages use a binary representation (don't forget everything is 0s and 1s in the end). This representation is the same for 9, 09, or 00009. When the number must be printed, it is converted back to a string representation, so you lose the leading zeroes.
If you need to store/remember the 0s, your only choice is to store the string representation of the number.
What you could do is storing both the number and string representation, like this:
function MyInt(s){
this.asString = s;
this.num = parseInt(s);
}
var i = new MyInt("09");
console.log(i.num); // 9
console.log(i.asString); // 09
Take note that leading 0 don't have any value for int. If want to use for display purpose use string and for calculation part use parseInt(someval)