Open chdyiboke opened 3 years ago
console.log(10.toString());//错 console.log(10.toFixed(2));//错 原因: (10.)toString(); (10.)toFixed(2)
解决方案 一、使用小数数调用 二、Number转化:Number(10).toFixed(2)
console.log(10.toString());//错 console.log(10.toFixed(2));//错 原因: (10.)toString(); (10.)toFixed(2)