title: How to push numbers into an array every time a function runs a la [1, 2, 3, 4, 5, 6 etc...]?
body: <pre><code>const p1Wins = [];
  
  function raiseScore() {
    if(xWinMessage) {
      const p1Name = document.querySelector('.p1-name');
      p1Name.style.color = 'green';
  
      for(i = 0; i &lt; p1Wins.length; i++) {
        p1Wins.push(i)
      }
      
      let p1Score = document.querySelector('.p1-score');
      p1Score = p1Wins
    }
  }
  </code></pre>
  <p>Not sure what I'd need to do to make this work. If anyone could help that'd be greatly appreciated.</p>