Hello
Hello
▶Run
code:ruby
class Hello
def initialize(n = 3, array =
"Hello", "こんにちは", "😀"
)
@n = n
@array = array
end
def hello
@n.times do
print @array.sample
end
puts
end
end
Hello.new.hello
Hello.new(5).hello
Hello.new(15, %w(🧡 💛 💙)).hello