Arsenic Arsenic - 27 days ago 4
Ruby Question

Ruby: Print something x amount of times

I want to return a string 'x' amount of times. My current code

return str + str + str + str

What do I do to make it look something like

return 4 * str


You are close...

return str * 4