text is a few words made of English letters (lowercase and uppercase) separated by single spaces, with no spaces at the start or the end.
Cut it down so that only the first count words remain, and return the result. The remaining words are still separated by single spaces, and there must be no trailing space.text="Meet me at the old bridge tonight", count=3 → 'Meet me at'
The first three words are "Meet", "me" and "at"; the rest is dropped.
text="Short note", count=2 → 'Short note'
The text has exactly two words, so it comes back unchanged.
text consists of English letters and single spaces between wordstexttext="Meet me at the old bridge tonight", count=3
'Meet me at'
Run checks the first 3 tests in your browser. Submit checks all 87 tests on the server, hidden ones included.