Guest User

Untitled

a guest
Jul 12th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. # def acronymize(sentence)
  2. # string = ""
  3. # sentence.split(" ").each do |word|
  4. # string += word[0].upcase
  5. # end
  6. # return string
  7. # end
  8.  
  9. # redo using map
  10.  
  11. def acronymize(sentence)
  12. sentence.split.map { |word| word[0].upcase }.join
  13. end
Add Comment
Please, Sign In to add comment