Kang-Kyu Lee

July 15, 2026

Numbers can count for you

In Ruby, even a number can do things. Because a number is an object too (remember, everything has its class).

3.times do
  puts "hello!"
end
#=> hello!
#=> hello!
#=> hello!

You just told the number 3 to do something 3 times. How friendly is that?

See you next time!

About Kang-Kyu Lee

I love hamburgers. I will share my experiences with Ruby and YouTube