Write a function that takes in a string of one or more words, and returns the same string, but with all five or more letter words reversed (Just like the name of this Kata). Strings passed in will consist of only letters and spaces. Spaces will be included only when more than one word is present.
编写一个函数,该函数需要一个或多个单词的字符串,并返回相同的字符串,但所有五个或多个字母单词都颠倒(就像此 Kata 的名称一样)。传递的字符串将只包括字母和空间。仅当存在多个单词时,才会包含空间。
涉及到的函数:split、append、join
join
split
append