JavaScript: Keeping the leading zero in a number -


this question has answer here:

i have simple function below. i'm passing number leading 0 argument , leading 0 getting stripped out of number. how can prevent occurring without passing in number string? possible?

function somefunction(number){       console.log(number); // 25468 <--- leading 0 removed     }      // pass in number leading zeros     somefunction(025468); 

how can prevent occurring without passing in number string? possible?

no. leading zeros of no significance in the number system / representation js uses , not stored in internal representation of number.

(or, if better, number has infinite leading zeros)