All quizzes
Free quiz · 24 questions in the bank

Ruby quiz

Test your Ruby knowledge with a free interactive quiz — 24 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What does `5.times { puts "hi" }` do?

In this round
  1. What does `5.times { puts "hi" }` do?
  2. What is a block in Ruby?
  3. In Ruby, what is true about (almost) everything?
  4. What does `nil` represent in Ruby?
  5. What is `irb`?
  6. What is a Ruby gem?
  7. Is Ruby statically or dynamically typed?
  8. What does `attr_accessor :name` generate?
  9. What does "duck typing" mean in Ruby?
  10. How do you define a method in Ruby?
  11. How does Ruby handle string interpolation?
  12. What is a Ruby symbol like `:name`?
Gaps to close?
Read the curated Ruby notes — core concepts, patterns, interview prep.
Ruby notes

More quizzes

.NETAccessibilityAgile MethodologyAlgorithmsAndroidAndroid SDK