title: Check for repeated characters in a string Javascript
body: <p>I was wondering if there is a way to check for repeated characters in a string without using double loop. Can this be done with recursion?</p>
  
  <p>An example of the code using double loop (return true or false based on if there are repeated characters in a string):</p>
  
  <pre><code>var charRepeats = function(str) {
      for(var i = 0; i &lt;= str.length; i++) {
          for(var j = i+1; j &lt;= str.length; j++) {
              if(str[j] == str[i]) {
                  return false;
              }
          }
      }
      return true;
  }
  </code></pre>
  
  <p>Many thanks in advance!</p>