Sorting the Sentence
A sentence is a list of words separated by a single space with no leading or trailing spaces. Each word consists of lowercase and uppercase English letters.
A sentence can be rearranged into a new sentence by sorting the words in any order. You need to implement a function that takes a sentence as input and rearranges the words in ascending order based on the integer values appended to each word. The integer value represents the position of the word in the original sentence.
Write a function to sort the sentence.
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)