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.
Examples:
spinWords( "Hey fellow warriors" ) => returns "Hey wollef sroirraw"
spinWords( "This is a test") => returns "This is a test"
spinWords( "This is another test" )=> returns "This is rehtona test"
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #85 Circularly Sorted Array (6kyu) (0) | 2018.07.25 |
---|---|
codewars #84Can you get the loop ? (5kyu) (0) | 2018.07.24 |
codewars #82Evil Autocorrect Prank (6kyu) (0) | 2018.07.19 |
codewars #81 Format words into a sentence (6kyu) (0) | 2018.07.18 |
codewars #80 Calculating Batting Average (6kyu) (0) | 2018.07.17 |