📅  最后修改于: 2022-03-11 15:01:18.731000             🧑  作者: Mango
function numDifferentiation(value) {
var val = Math.abs(value)
if (val >= 10000000) {
val = (val / 10000000).toFixed(2) + ' Cr';
} else if (val >= 100000) {
val = (val / 100000).toFixed(2) + ' Lac';
}
return val;
}
console.log(numDifferentiation(-500000))
Run code snippet