javascript string to double
var string = "10";
var double = parseFloat(string);
console.log(typeof(double)); // float
// parseFloat used for float and double datatypes
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
// parseFloat takes in a string value and converts it to a float
// The parseFloat function will look at the first character of
// the string and decided whether that character is a number or not
// If not the parseFloat function will return Nan
let stringNumber = "8.0"
let floatNuumber = parseFloat(stringNumber);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us