Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  22] [ 5]  / answers: 1 / hits: 15822  / 9 Years ago, sun, june 21, 2015, 12:00:00
var current = 12000;
var june = 14600;
var may = 11200;


I want percent change with respect to 'current' month parameter. The output should be in percent and it can add or subtract w.r.t. the current month. How to do this?


More From » math

 Answers
51

Its simple maths:



var res=(current-june)/current*100.0;

[#66111] Friday, June 19, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
gregorio

Total Points: 362
Total Questions: 95
Total Answers: 93

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;