title: How can I find the longest words in the string and return those (excluding duplicates) along with maximum length?
body: <p>I know how I can find the longest word in a string. For example this code here.
  But here the problem is that the word "bbbbbb" is found because he is the
  FIRST LONGEST WORD IN THE string,after that with 6 chars we have also the word "jumped". My question is how can I find in this case and the word "jumped",so all of them not only the first one.</p>
  
  <p>UPDATE: I want unique list, so only one of each words</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function longestWord(sentence) {
    sentence = sentence.split(' ');
  
    let theWord = sentence[0];
    var longest = 0;
    for (let i = 0; i &lt; sentence.length; i++) {
      if (sentence[i] != "") {
        if (sentence[i].length &gt; theWord.length) {
          longest = sentence[i].length;
          theWord = sentence[i];
        }
      }
    }
    return {
      length: longest,
      actuallWord: theWord
    }
  }
  console.log(longestWord("The quick brown as bbbbbb fox jumped over the bbbbbb lazy dog"));</code></pre>
  </div>
  </div>
  </p>