[Solved] Number with leading zeroes gets changed in JavaScript

[ad_1]

JavaScript thinks it is an octal value (because of the leading zero and the lack of digits greater than 7). The decimal value of octal 0011110416605 is 1226972549. Example:

> var value = 010; //10 in octal
> console.log(value);
> 8  //is 8 in decimal

Use a string instead:

removeFromCart("0011110416605")

4

[ad_2]

solved Number with leading zeroes gets changed in JavaScript