title: what is the meaning of navigator.userAgent.indexOf in javascript,i used this in my javascript?
body: <p>I'm using this for my browser width checking..</p>
  
  <p>But i dont know the exact meaning,i'm new to javascript.</p>
  
  <p>How can i do this ?</p>
  
  <p>Here is my Code : </p>
  
  <pre><code> if(navigator.userAgent.indexOf("840") != -1){
  
   //
  
   }
  </code></pre>