title: Javascript fine-tuning + find exact match for a name
body: <p>Is there a built in JavaScript string method that can help me fine tune this code to make sure it only finds exact matches for the name?</p>
  
  <p>Here's my code.</p>
  
  <pre><code>/*jshint multistr:true */
  
  var text = "Sid quick brown fox jumps over the lazy dog ";
  var myName = "Sid";
  var hits = [];
  
  for (var i=0; i&lt; text.length; i++){
      if(text[i] === 'S'){
          for(var j=i; j &lt; i + myName.length; j++){
              hits.push(text[j]);
          }
      }else{
          console.log("Your name wasn't found!")
      }
  
  }
  console.log(hits);
  </code></pre>