# power operator (^)

put 8 ^ 2 into myFavoriteNumber

The “power” operator raises the given number to the given power. In non-mathematical terms, it multiplies the number to the left of it by itself as many times as the number to the right of it.

E.g. if you were to do `8 ^ 3` it would calculate the result of `8 * 8 * 8`. If you specify `0` as the right argument, it will return the number `1`, no matter what number is to its left.

No comments yet