Answers for "ruby repeat string n times"

0

how to repeat a string n times in ruby

30.times { 
  # do something
} 

# or, the equivalent

30.times do 
  # do something
end
Posted by: Guest on March-28-2020

Browse Popular Code Answers by Language