📜  将字符串转换为浮点 javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:42.448000             🧑  作者: Mango

代码示例4
//do do this use parseFloat()
//it turns a string into a float in js
//you can later use this for animation
var string = "10"
string = parseFloat(string)
console.log(string)