I'm trying to capitalize an array, of which some strings consists of multiple words, like for example:
array = ["the dog", "the cat", "new york"]
I tried to use:
array.map(&:capitalize)
but this only capitalized the first letter of each string. Any suggestions? (I'm very new to coding ^_^)
My desired output is:
["The Dog", "The Cat", "New York"]