How to have a number to be a power?

My Javascript has this:

(A + B) ? C

I have everything else, but how do i have C to be a power? I thought using ^ would work, but it just adds it.

Answers:

Answer

JavaScript does not have an operator for exponentiation. ^ is actually the bitwise XOR operator.

Try using Math.pow instead:

var d = Math.pow(a + b, c);

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us Javascript

©2020 All rights reserved.