Published
- 1 min read
format percentage javacsript
The solution for this is noted below
format percentage javacsript
Solution
var x=150;
console.log(parseFloat(x).toFixed(2)+"%");
x=0;
console.log(parseFloat(x).toFixed(2)+"%");
x=10
console.log(parseFloat(x).toFixed(2)+"%");
Try other methods by searching on the site. That is if this doesn’t work