Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript intl.numberformat percent

var discount = 0.251;

var option = {
   style: 'percent',
   minimumFractionDigits: 2,
   maximumFractionDigits: 2
};
var formatter = new Intl.NumberFormat("en-US",option);
var discountFormat = formatter.format(discount );
console.log(discountFormat);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #percent
ADD COMMENT
Topic
Name
5+1 =