+ 2
How to convert String to number? And number to String?
need answer
3 Antworten
+ 4
With the parseInt(), parseFloat() functions and toString() method ^^
var t = "42.0";
var f = parseFloat(t);
var i = 42;
var s = i.toString();
0
Thank you :)
0
var num1 = "43.76";
num1 = +num1;// 43.76
var num2 = 43.76;
num2 = "" + num2;// "43.76"