exponentiation_operator
🎲 Exponentiation Operator​
Ruby's **
operator performs exponentiation, replacing calls to Math.pow
. It's useful for mathematical computations directly in expressions.
2 ** 3 # => 8
9 ** 0.5 # => 3.0 # square root
# Combine with other operators
3 * 2**4 # => 48 # equivalent to 3 * (2**4)