Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js float to percentage

const probability = 0.7;
const percentage = Math.round( ( probability * 100) );
console.log( percentage + "%" );
//=> 70%
 
PREVIOUS NEXT
Tagged: #js #float #percentage
ADD COMMENT
Topic
Name
9+3 =