title: How to check if a string does not equal another string in an array?
body: <p>In this first part of code it checks if the user entered a username and password that matches, and if it does, then we log in the client. This part of code is fine. It works when it is supposed to.</p>
  
  <p>First code: </p>
  
  <pre><code>//If the user entered a username &amp; pass that matches a stored user &amp; pass
  if (incomingClients[i].username == existingClients[e].username) {
      if (incomingClients[i].password == existingClients[e].password) {
          //LogInClient();
      }
  }
  </code></pre>
  
  <p>In this second part, it is supposed to check if the user entered a username that does NOT exist, and if it doesn't exist, then we tell the user that he/she has entered a username that does not exist.</p>
  
  <p>Second code:</p>
  
  <pre><code>//If the user entered a username that DOES NOT match a stored user
  if (incomingClients[i].username != existingClients[e].username) {
      //NotifyClientUserDoesntExist();
  }
  </code></pre>
  
  <p>The problem I am having here is that the second code is always true. Why is this? </p>
  
  <p>If I enter a username that exists the first code executes, but so does the second code. I only want the second code to execute if the incoming.username is not equal to existing.username.</p>
  
  <p>Thank you in advance.</p>