Fruit salads are served best when the fruits are sliced and diced into small chunks!
For this challenge, slice each fruit in half and sort the chunks alphabetically. This recipe tastes best when the chunks are joined together to make a string.
fruitSalad(["apple", "pear", "grapes"]) β "apargrapepesple"
// Chunks: ["ap", "ple", "pe", "ar", "gra", "pes"]
// Sorted chunks: ["ap", "ar", "gra", "pe", "pes", "ple"]
// Final string: "apargrapepesple"
fruitSalad(["apple", "pear", "grapes"]) β "apargrapepesple"
fruitSalad(["raspberries", "mango"]) β "erriesmangoraspb"
fruitSalad(["banana"]) β "anaban"
"apple" will be sliced into "ap" and "ple".