Javascript String numberFormat()

Description

Javascript String numberFormat()



String.prototype.numberFormat=function() {
   return this.replace(/(\d)(?=(?:\d{3})+(?!\d))/g,'$1,');
}

function numberformatter(vNum){
  return String(vNum).numberFormat();
}



PreviousNext

Related