I am getting a value from database and I am reusing it as a number. This number has leading zeroes and it is limited to only 4 digits, meaning to say the format is 0001
or 0010
or 0100
or 1000
. I am starting the count from zero when I add 1 to this number the leading zeroes are gone the way I add is for example
var databasevalue = 0000;
var incrementvalue = parseInt(databasevalue) + parseInt(1);