How to pass a number with leading zero as decimal value to a function in JavaScript?

In JavaScript a number with leading zeros is considered to be in Octal system and it is read as octal value.

Ex:”0025″ is read as “21”.

In order to have its value preserved we should pass it as string.

Ex: myfunction(x){
   
alert(x);
}

we should call function as myfunction(“0026”)