My following code is to calculate the monthly payment of someones mortgage. I was given the formula:

payment = loan * (rate/100/12) / ( 1 - ( 1 / ( 1 + (rate/100/12) )) ^ (years * 12 ))

How can I substitute the '^' with Math.pow in order to get this equation to work in my code.