Javascript || Count space || HashMap
\n/**\n * @param {string[]} messages\n * @param {string[]} senders\n * @return {string}\n */\nvar largestWordCount = function(messages, senders) {\n    let word
```\n/**\n * @param {string[]} messages\n * @param {string[]} senders\n * @return {string}\n */\nvar largestWordCount = function(messages, senders) {\n    let wordCount = {}\n    let result = \'\'\n    let maxCount = -Infinity\n    for (let i = 0; i < messages.length;i++) {\n        let count=messages[i].split(\' \').length\n        wordCount[senders[i]] = wordCount[senders[i]] == undefined ? count : wordCount[senders[i]] + count;\n        if (wordCount[senders[i]]  > maxCount || (wordCount[senders[i]]  == maxCount && senders[i] > result)) {\n            maxCount = wordCount[senders[i]];\n            result = senders[i];\n        }\n    }\n    return result;\n\n};\n```
['JavaScript']