I'm trying to convert string into number but it is adding exponential symbol. I'm expecting the same output but in number not in string.
I have tried toFixed()
, but it is returning string.
For example
var x = "0.00000001";
+x.toFixed(8);
console.log(x); // Actual Output: "0.00000001" | Expected output: 0.00000001
Sample code
var x = "0.00000001";
+x; // output: 1e-8
Actual Output: "0.00000001"
Expected output: 0.00000001