codingtcher.com
Theme Night
Home
Login

javascript string to double

Home » Tutorial Post » javascript string to double
//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 Post