Javascript Number toPercent(places)

Description

Javascript Number toPercent(places)


Number.prototype.toPercent = function(places) {
  return (this * 100).toFixed(places) + '%';
};



PreviousNext

Related