I\'m having a mental block here, and algebra not really being my thing, can you tell me how to re-write the JavaScript code below to derive the variable, c, in
c
Logarithms. You want the logarithm of a. B is the base, c is the exponent, so
logb a = c
c = Math.log(a)/Math.log(b)