I have a function to add commas to numbers:
function commafy( num ) { num.toString().replace( /\\B(?=(?:\\d{3})+)$/g, \",\" ); }
Unfortun
Simple as that:
var theNumber = 3500; theNumber.toLocaleString();