h60359 s 00000/00000/00037 d D 1.2 05/08/18 14:54:18 blh 2 1 c e s 00037/00000/00000 d D 1.1 05/08/17 10:52:54 pcy 1 0 c date and time created 05/08/17 10:52:54 by pcy e u U f e 0 t T I 1 0); var tot_pop = 0; for(var i=0; i < num_rows; i++){ tot_pop = tot_pop+data[i]; }; tot_pop=Math.round(tot_pop/1000.0); tot_pop=tot_pop*1000; function addSeparatorsNF(nStr, inD, outD, sep) { nStr += ''; var dpos = nStr.indexOf(inD); var nStrEnd = ''; if (dpos != -1) { nStrEnd = outD + nStr.substring(dpos + 1, nStr.length); nStr = nStr.substring(0, dpos); } var rgx = /(\d+)(\d{3})/; while (rgx.test(nStr)) { nStr = nStr.replace(rgx, '$1' + sep + '$2'); } return nStr + nStrEnd; } document.getElementById('result').innerHTML=addSeparatorsNF(tot_pop, '.', '.', ','); E 1