title: JavaScript Tic Tac Toe - Append Value into Board Stored as Nested Array
body: <p>I have a function that changes the content of the board cell clicked into an X or an O, depending on the count.</p>
  
  <p>Here it is:</p>
  
  <pre><code>let count = 0
  function clickToInput(event){
      let i = event.target;
      event.target.parentElement.innerHTML = playerCounter();
      count++;
  }
  </code></pre>
  
  <p>Where the function playerCounter() is defined as:</p>
  
  <pre><code>function playerCounter(){
          if(count%2 == 0){
              inputCharacter = "&lt;button&gt;X&lt;/button&gt;";
          }
          else{
              inputCharacter = "&lt;button&gt;O&lt;/button&gt;";
          }
          return inputCharacter
  }
  </code></pre>
  
  <p>And here is how my board array is stored:</p>
  
  <pre><code>row1 = ["&lt;button&gt;1a&lt;/button&gt;", "&lt;button&gt;1b&lt;/button&gt;", "&lt;button&gt;1c&lt;/button&gt;"];
  row2 = ["&lt;button&gt;2a&lt;/button&gt;", "&lt;button&gt;2b&lt;/button&gt;", "&lt;button&gt;2c&lt;/button&gt;"];
  row3 = ["&lt;button&gt;3a&lt;/button&gt;", "&lt;button&gt;3b&lt;/button&gt;", "&lt;button&gt;3c&lt;/button&gt;"];
  board = [row1, row2, row3];
  let count = 0;
  </code></pre>
  
  <p>Now what I'm trying to do is take inputCharacter and replace the string value in the nested array(which corresponds to the button that was clicked.</p>
  
  <p>I didn't include my HTML as I thought it would be lengthy, but please do mention if it's necessary.</p>