title: Javascript If statement used to check file extensions not working
body: <p>I have a form in which people can enter file paths. I want to make sure that the paths they are entering point to pictures so here is what I thought would work.</p>
  
  <pre><code>function checkExt()
  {
      var extension= /* I know that the code to cut the extension off of the file
                        is working correctly so for now let's just go with it ok */
      if(extension!="jpg" || "gif" || "bmp" || "png" || "whatever else")
          alert("The file extension you have entered is not supported");
  }
  </code></pre>
  
  <p>But this does not work. I have tracked it down to the if statement because if I select only 1 kind of file to check for, then it will work correctly. So my question to you is what the hell do I have to change to make this thing work correctly. I've been on this for about three hours now and it's driving me mad. Thanks for all of the help in advance. </p>