const a = 043
console.log(Number(a))
Here the variable a is octal because of which we get the result as 35. Instead, I want the variable a to be a number 43. Found results for removing leading zeros from a string(Remove leading zeros from a number in Javascript)