JSFiddle - React, Tailwind, and code Playground
by funato
JavaScript
function numberFormat(source){
var s=new String(source);
var ret='';
for (var i=s.length-3; i>0; i-=3){
ret=','+s.substr(i,3)+ret;
}
ret=s.substr(0,i+3)+ret;
return ret;
}
document.write('合計金額は、'+numberFormat(2890*5)+'円です<br>');