title: I'm not sure how to use lodash orderBy
body: <p>My program is currently supposed to take the HTML input, put it into an object array, sort it using orderBy, then output it to the p2 textContent. I tested all of the aspects of this program before adding orderBy, and then the program stopped working.</p>
  
  <pre><code>var p1 = document.getElementById("p1");
  var p2 = document.getElementById("p2");
  var enterName = document.getElementById("name");
  var enterRating = document.getElementById("rating");
  var button = document.getElementById("button");
  var players = [];
  
  button.addEventListener("click", addPlayer);
  
  function addPlayer() {
    p1.innerText += enterName.value + " - " + enterRating.value + " " + "| ";
    players.push({ player: enterName.value, rating: enterRating.value });
  
    var sortedPlayers = _.orderBy(players, [rating, player], [desc, desc]);
  
    console.log(players);
    console.log(sortedPlayers);
    p2.innerText = "";
    for (i = 0; i &lt; players.length; i++) {
      p2.innerText += players[i].player + " - " + players[i].rating + " | ";
    }
  }
  </code></pre>
  
  <p>p1 exists and is used for testing purposes, just to make sure that my browser isn't lagging. After I added the orderBy, neither array logged to the console. Before, the players array logged with every run of the <code>addPlayer()</code> function. </p>
  
  <p>I'm using codepen to write this program, and I am pretty sure lodash is installed if that is relevant.</p>