Ruby - Methods - Variable Arguments

  • + 0 comments

    I way overthought this problem, but the problems are often written poorly and this one definitely was. Don't overthink this and you will find the solution quite easily.

    def full_name(first, *mid, last)
    [first, *mid, last].join(' ')
    end