I was recently looking at some other questions and doing a looking around and came across someone using x^y
(x to the power of y).
Unfortunately this doesn't work. Here are a few examples and their outputs.
2^2 // 0
2^3 // 1
2^4 // 6
Math.pow(2,2) // 4
Math.pow(2,3) // 8
Math.pow(2,4) // 16
Why doesn't num^power
work? I swear it used to. What arithmetic is it actually doing?