title: JavaScript If / else statement not return false statement
body: <p>Function returns true, however if / else statement is logging false result. Any  idea where I'm going wrong?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function loginDetails(arrayCheck, value) {
   for(i = 0; i &lt; arrayCheck.length; i++){
     if(arrayCheck[i] === value){
      return true;
      }
    }
    return false;
    }
  
   var username = [1,2,3,4,5,6,7,8,9,10];
    
    document.write('Login Details: ', loginDetails(username, 9), '&lt;/p&gt;');
   
    if(loginDetails === true) {
    document.write('Redirect ....Welcome !!&lt;/p&gt;'); 
    
    } else {
    document.write('There seems to be an error please try again !!');
    }
    </code></pre>
  </div>
  </div>
  </p>