title: Difference between string.indexOf() and string.lastIndexOf()?
body: <p>What's the difference between <code>string.indexOf()</code> and <code>string.lastIndexOf()</code> in JavaScript?</p>
  
  <pre><code>var temp = state.indexOf("tmp");    
  var temp = state.lastIndexOf("tmp");
  </code></pre>