var a = 000077;
I would like to see in console.log(a) 000077. How is it possible to perform this?
var a = 000077;
I would like to see in console.log(a) 000077. How is it possible to perform this?
You could format the number as string with Number#toLocaleString
.
var a = 77;
console.log(a.toLocaleString(undefined, { minimumIntegerDigits: 6, useGrouping: false }));
instead of
var a = 000077;
make it a string
var a = "000077";