SyntaxFix
Write A Post
Hire A Developer
Questions
var number = 5000; var percentX = 12; var result; function percentCalculation(a, b){ var c = (parseFloat(a)*parseFloat(b))/100; return parseFloat(c); } result = percentCalculation(number, percentX); //calculate percentX% of number