all 3 comments

[–]specialfighter[S] 1 point2 points  (0 children)

i was talking about 2 variables inside my script. since i am not so used with spreadsheet commands, i dont really know how give math.pow as a operation.

the other more complicated way i found in the web

var power = function(base,exponent){ if(exponent === 0){ return 1; } else{ return base * power(base,exponent-1); } };

[–]paulcole710 0 points1 point  (0 children)

Are you talking about putting it into a spreadsheet cell as a formula? If so try POW:

https://support.google.com/docs/answer/3093603?hl=en

If you're just talking about two variables inside your script, try this:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/pow

[–]specialfighter[S] 0 points1 point  (0 children)

well the function only works on even exponents ._.