Demo using the percent number formatting style
by David Storey
JavaScript
console.log(new Intl.NumberFormat("en", { style: "percent" }).format(0.5)); // Chrome: "50%", IE: "50 %"
by David Storey
console.log(new Intl.NumberFormat("en", { style: "percent" }).format(0.5)); // Chrome: "50%", IE: "50 %"