js & parseFloat & toFixed
js & parseFloat & toFixed
https://repl.it/languages/javascript
https://repl.it/repls/MintyBaggyPiracy
let x = parseFloat( 0.5714285714285714).toFixed(3);
let y = parseFloat( 1).toFixed(3);
let z = parseFloat( 0).toFixed(3);
console.log(x);
console.log(y);
console.log(z);
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10438688.html
未经授权禁止转载,违者必究!