📌  相关文章
📜  javascript 从字符串中删除最后一个字符 - 任何代码示例

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

代码示例10
var v1 = "1151.00";
v1 = v1.slice(0, -1); 
console.log(v1);

var v1 = "1151.00";
v1 = v1.substring(0, v1.length - 1);
console.log(v1);

console.log(parseFloat(v1).toFixed(1));

var s1 = "PHP7";
s1 = s1.substring(0, s1.length - 1);
console.log(s1);