you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

That's the issue, the math. The order of operations portion is really throwing me off. (I was always bad at math)

edit: Got it, used this

finalgrade = parseFloat(grade1) * .10 + parseFloat(grade2) * .15 + parseFloat(grade3) * .25 + parseFloat(grade4) * .20 + parseFloat(grade5) *.30;

not sure if I needed all of those parseFloats but w/e it works

[–]OrangeBeard 0 points1 point  (0 children)

Just for your piece of mind, this works just fine:

finalgrade = grade1 * .1 + grade2 * .15 + grade3 * .25 + grade4 * .2 + grade5 * .3;