or (building a string instead of an array) sentence.chars.reduce("") do |result, char| result += vowels.include?(char) ? "X" : char end.
確定! 回上一頁