Hello all,
I am reading the book Ruby on Rails Tutorial : Learning by Example
At the end of chapter 4 theres a question. I tried many time but nit succeeding in solving it.
Can you all please help me in writing a solution for the same?
Question is :
Using Listing 4.9 as a guide, combine the split, shuffle, and join methods to write a function that shuffles the letters in a given string.
Listing 4.9. Skeleton for a string shuffle function :
def string_shuffle(s) s.split('').?.? end
=> nil
string_shuffle("foobar")
Thank you