title: Variable behaves differently in repeat loop
body: <pre><code>set randomString to "this is a random string"
  </code></pre>
  
  <p>For some reason</p>
  
  <pre><code>set firstWord to the first word of randomString
  set isThereTruth to firstWord = "this" 
  display dialog isThereTruth
  </code></pre>
  
  <p>returns true but</p>
  
  <pre><code>repeat with x in words of randomString
       display dialog x
       set isThisTruth to x = "this"
       display dialog isThisTruth
  end repeat
  </code></pre>
  
  <p>returns false</p>
  
  <p>I'm pretty new to applescript so sorry for the silly question, but it has been difficult to search for the answer, and maybe someone else has run into this problem.</p>
  
  <p>I tried testing to make sure (though I can't imagine why it wouldn't be) the variable is a string, but I'm pretty sure my method for testing why kind of a variable a variable is doesn't really work.</p>