daily pastebin goal
91%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top