Back to Blogs
#todayisearched#ruby

What does ** (two asterisks in a row) mean in Ruby?

Today I saw ** used between two integers. I had no idea what it meant so I turned to google. Turns...

Updated 1 min read
Cover for What does ** (two asterisks in a row) mean in Ruby?

Today I saw ** used between two integers. I had no idea what it meant so I turned to google. Turns out that two asterisks is Ruby's arithmetic operator for exponentiation.

i.e. 2**3 means 2³ aka 2x2x2 aka 8