Finish the method definition given below.
Given an array of fruits as strings fruits
, the method fruit_salad
should perform the following.
- Slice name of each fruit in half.
- Sort the chunks that were sliced in previous step alphabetically.
- Join the alphabetically sorted chunks and return a string.