codingtcher.com
Theme Night
Home
Login

Convert string to float javascript

//javascript string to double
var string = "10";
var double = parseFloat(string);
console.log(typeof(double)); // float
// parseFloat used for float and double datatypes

//javascript convert string to float
let stringNumber = "8.0"
let floatNuumber = parseFloat(stringNumber);

Related Code