Add a space function in Ruby

Member

letha

by letha , in category: Ruby , 24 days ago

Add a space function in Ruby 😃

1
2
3
4
5
6
7
def space(n)
    str = ''
    n.times do
      str += ' '
    end
    str
  end


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

no answers