I'm trying to convert an Excel formula into jQuery.
Excel Formula:a1 * (a2/ 12) / (1 - (1 + (a2/ 12)) ^ -(a3* 12));
However, I'm stuck where the operator "^" came out. I researched Math.pow but I'm not sure how I'm gonna set values inside that method
So far, I have this
var temp = $('#slider1').slider('value'); //value is 16000
var temp2 = $('#slider2').slider('value'); //value is 7
var temp3 = 3.85;
finalval = Math.pow(temp * (temp3 / 12) / (1 - (1 + (temp3 / 12))), -(temp2 * 12));
$('#output').text(finalval);
I'm not really familiar with Math functions, can