You are viewing a single comment's thread. Return to all comments →
Solution 1:
def full_name(*str) str.inject { |a, b| a + ' ' + b } end
Solution 2:
def full_name(*str) str.join(' ') end
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby - Methods - Variable Arguments
You are viewing a single comment's thread. Return to all comments →
Solution 1:
Solution 2: