title: Why doesn't indexOf work on an array IE8?
body: <p>The below function works fine on Opera, Firefox and Chrome. However, in IE8 it fails on the <code>if ( allowed.indexOf(ext[1]) == -1)</code> part.</p>
  
  <p>Does anyone know why? Is there any obvious mistake?</p>
  
  <pre><code>function CheckMe() {
      var allowed = new Array('docx','xls','xlsx', 'mp3', 'mp4', '3gp', 'sis', 'sisx', 'mp3', 'wav', 'mid', 'amr', 'jpg', 'gif', 'png', 'jpeg', 'txt', 'pdf', 'doc', 'rtf', 'thm', 'rar', 'zip', 'htm', 'html', 'css', 'swf', 'jar', 'nth', 'aac', 'cab', 'wgz');
      var fileinput=document.getElementById('f');
      var ext = fileinput.value.toLowerCase().split('.');
      if ( allowed.indexOf(ext[1]) == -1) 
      {
          document.getElementById('uploadsec').innerHTML = document.getElementById('uploadsec').innerHTML;
          alert('This file type is not allowed!');
      }
  }
  </code></pre>