title: Multiple conditions using for loop
body: <p>I'm beginning programming with codecademy and I tried to write a "search for word" program, but I don't know how to write a condition in <code>if</code> using a <code>for</code> loop to check all the letters in a search word, no matter the length.</p>
  
  <p>I know the for loop gives me <code>true</code> or <code>false</code>, but I would like it to generate as many <code>text[j] === myWord[j-i]</code> conditions to my code as there are letters.</p>
  
  <p>Is there something wrong with my syntax or should I use other command that I don't know of?</p>
  
  <pre class="lang-js prettyprint-override"><code>var text = "Within the field of literary criticism, text also refers to the original information content of a particular piece of writing; that is, the text of a work is that primal symbolic arrangement of letters as originally composed, apart from later alterations, deterioration, commentary, translations, paratext, etc. Therefore, when literary criticism is concerned with the determination of a text, it is concerned with the distinguishing of the original information content from whatever has been added to or subtracted from that content as it appears in a given textual document (that is, a physical representation of text).";
  
  var myWord = "literary";
  var hits = [];
  
  for (var i=0; i &lt; text.length; i++) {
      if (for (var j=i; j&lt;(i + myWord.length); j++){
              text[j]===myWord[j-i]
          })
          hits.push(text[i])
      }
  }
  
  if (hits.length === 0) {
      console.log("Your name wasn't found!");
  }
  else {
      console.log(hits);
  }
  </code></pre>