3 ms·
> Ask me to reverse the order of words in a string and you'll get: "Words in a string".split(" ").reverse.join(" ") #=> "string a in Words" Which is, of
by skrebbel 16y ago
> Ask me to reverse the order of words in a string and you'll get:
"Words in a string".split(" ").reverse.join(" ") #=> "string a in Words"
Which is, of course, the best answer you could provide. Unless you're applying for programming microcontrollers, that is.