ahmed
· @abo-elleef
·
almost 3 years
you can do the same without flags and new string in memory def swag(text) text = ARGV.join(‘ ‘) text.split(‘’).map.with_index do |char, index| index.even? ? char.upcase : char.downcase end.join(‘’) end