You are viewing a single comment's thread. Return to all comments →
def rot13(secret_messages) secret_messages.map do |string| string.chars.map { |c| c.ord < 97 || c.ord > 122 ? c : c.ord + 13 > 122 ? (c.ord - 13).chr : (c.ord + 13).chr }.join end end
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby - Enumerable - collect
You are viewing a single comment's thread. Return to all comments →