Write wordCounts(text). Split the text on whitespace and count the words exactly as written, so 'The' and 'the' are different words. Return an array of [word, count] pairs, sorted by count from high to low and, among equal counts, by word ascending in code unit order.
- Several spaces, tabs and newlines in a row are one separator, and leading or trailing whitespace is ignored
- Words can be
constructor, toString, __proto__ or hasOwnProperty, and must be counted like any other - An empty text, or one with only whitespace, returns
[] - Return an array of arrays, not a
Map