title: How to write a javascript to discern between specific guests for a "guest list" variable array
body: <p>So this isn't anything crazy as I am just starting out with coding. I just learned about if else statements and then variable arrays. I made a &quot;guest list&quot; code that will either welcome the guest or tell them to leave, if their name is in the variable array. I have that down fine. But I'm trying to make it so that one specific person when prompted for their name will be greeted differently than the others, without it also executing the other code. I've gotten it to work, but it'll say &quot;hello, sir!&quot; and then say &quot;you can't enter!&quot; right after. The snippet I have attached is the base working idea, and the image shows what I want to add. I'm just really trying to get down these if else statements because I think these will be really helpful in the long run. I effectively want this to recognize the name, then if the name is on the normal list, greet them. If it's on the owner list, respectful greeting. And if on neither, tell them to leave, without double responses.</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>var guestList = ["John", "Tony", "Mark", "Jones", "Mike"];
  var ownerList = ["Cole"];
  
  
  var guestName = prompt("What is your name?");
  
  //This is the code I'm trying to add 
  if (ownerList.includes("guestName")) {
    alert("Hello, Sir!")
  }
  
  if (guestList.includes(guestName)) {
    alert("Hello, and welcome!")
  } else {
  
    alert("You shall not pass!");
  }</code></pre>
  </div>
  </div>
  </p>