(x / y) * 100 in javascript

So I can’t get this to work for some reason, I’m trying to calculate (x / y) * 100 where x is a variable determined by user input and y is an output variable. It’s pure Javascript. I think I’m probably just being dumb but I can’t figure it out.

Currently I’m putting

parseInt(input2Value) / parseInt(output2Value) * 100;


Source: javascript

Leave a Reply