Sollicitatievraag bij Anadea

How do you create your own reverse method?

Antwoord op sollicitatievraag

Anoniem

12 sep 2024

def custom_reverse(str) chars = [] str.each_char { |char| chars.unshift(char) } chars.join end