Rearrange Words in a Sentence
Given a sentence text consisting of words separated by spaces, rearrange the words in the sentence such that the following conditions are satisfied:
The first word is at the beginning of the sentence. The last word is at the end of the sentence. The second word is the longest word. The third word is the second longest word, and so on.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)