Jonas Troyer10,912 Points
Why is this saying yo instead of hi?
Why is my code giving me back yo instead of hi, I don't see where it is inputting these statements into my code?
def repeat(string, times) fail "times must be 1 or more" if times < 1 counter = 0 loop do puts string counter += 1 if counter > 4 break end end end
Brandon McClelland4,645 Points
You should be assigning the string to
repeat when you call the repeat method.