title: How to optimize conditional statements in my code
body: <p>I have a 2D array named <code>extraRank</code> which holds other users arrays named <strong>userA</strong>, <strong>userB</strong>, <strong>userC</strong> and <strong>userD</strong> whenever I push them into it:</p>
  
  <pre><code>// users arrays:
  userA = ["Sara Ree",18, "Doctor", "441", "31"];
  userB = ["Marry",18, "Nurse", "41", "1"];
  userC = ["John Doe",18, "Woker", "21", "31"];
  userD = ["Alex Morph",18, "Musisian", "81", "51"];
  
  // users arrays may be pushed to this array  
  let extraRank = [];
  </code></pre>
  
  <p>what I want is an efficient way to do this:</p>
  
  <p>first, check which users arrays exist in <code>extraRank</code>.</p>
  
  <p>then if for example, <strong>userA</strong> exist do this:</p>
  
  <p>if <code>extraRank.indexOf(userA) == 0</code> then assign <code>userA_Index = 10;</code></p>
  
  <p>if <code>extraRank.indexOf(userA) == 1</code> then assign <code>userA_Index = 9;</code></p>
  
  <p>if <code>extraRank.indexOf(userA) == 2</code> then assign <code>userA_Index = 8;</code></p>
  
  <p>if <code>extraRank.indexOf(userA) == 3</code> then assign <code>userA_Index = 7;</code></p>
  
  <p><strong>I know one way is to this using if statements</strong> for each user, but I'm wondering if there is a more efficient way to do it...</p>