title: check that a word is an isogram with pure javascript
body: <p>How do i check that a given word is an isogram with pure javascript, using a function. the function must return true or false.</p>
  
  <p><em>An isogram is a word with a repeated character.</em></p>
  
  <p>I know this code works, but i need a better solution.</p>
  
  <pre><code>function isIsogram(word){
      x = false; y = false;
      for(i = 0; i &lt; word.length; i++){
          wordl = word.substring(0,i)
          wordr = word.substring(i)
          x = wordl.includes(word.charAt(i))
          y = wordr.includes(word.charAt(i))
          //console.log(x,wordl,wordr)
      }
      return x&amp;&amp;y
  }
  isIsogram("thomas");//False
  isIsogram("moses"); //True
  </code></pre>