For example given a string "43.44", is there any way to convert it to a float without casting or using parseFloat?
2 Answers
You could use an implicid type casting with an unary plus +.
var string = "43.44",
number = +string;
console.log(number);
console.log(typeof number);