Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

percentage formula in javascript

var number = 120;
 
//The percent that we want to get.
//i.e. We want to get 50% of 120.
var percentToGet = 50;
 
//Calculate the percent.
var percent = (percentToGet / 100) * number;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #percentage #formula #javascript
ADD COMMENT
Topic
Name
3+9 =