Arsenic Arsenic - 2 months ago 5
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

Answer

You are close...

return str * 4
Comments