title: Why the output is wrong if I add an else statement
body: <p>From the below code, I get the answer true, if  dont include the else statement. 
  If else, statement is included, the I'm getting a false. Why is that ?</p>
  
  <pre><code>function search(arr, item) {
  
  
      for (let i=0; i &lt;  arr.length; i++){  
          if (arr[i] == item){ 
              return true;
          }
          else{
              return false;
          }
  
      }   
  }
  
  src = search([6, 2, 3, 4], 3);
  console.log(src);
  </code></pre>