142
rated 0 times
[
144]
[
2]
/ answers: 1 / hits: 28404
/ 13 Years ago, mon, november 7, 2011, 12:00:00
Let's say I have some numbers that I want to multiply and add.
var a = 5;
var b = 10;
var c = 2;
var d = 3;
I want to sum b and c then multiply that by a, then add d. Easy right?
If if were a normal equation the formula would look like: (a * (b + c) + d)
But how do I do that in JQuery?
(Note: the reason for JQuery is that I'll be getting these numbers from fields and divs... and placing a total elsewhere, etc.)
More From » jquery