+ 10
How convert any number into percentage?
I have a number of 50, how can I convert it into percentages, to make it 50%
6 Respuestas
+ 6
var num = 50;
var percentage = `${num}%`;
+ 6
50 + '%' or, '${num}%'
:)
+ 4
console.log(50 + '%')
+ 4
concat 50+'%' its very useful when using javscript with html to adjust dom style attributes.
+ 2
function numberToPercentage(num) { return num+'%'; }