title: Javascript: How to compare two arrays, and return the name of the array with highest value in a certain index
body: <p>I have been working on the scoring system for a game I am building with Javascript and have run into a problem. I am trying to compare the index 0 of a couple of arrays and return the index 1 of the array with the highest value.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>var player1 = new Array [1, "billy"];
  var player2 = new Array [2, "jean"];
  
  function checkWinner() {
      var winner = Math.max(player1[0], player2[0]);
      console.log(winner[1]);
  }
  
  checkWinner();
  </code></pre>