title: Add more than one item to an Array using the same Javascript Function
body: <p>I am a student learning basic JS and I am trying to create a webpage that will display an array based on the numbers entered into the input box. So far I have been able to make a function that adds a single item to the array, but it does not work if you try to add a second number to the array. I am not sure if I am formatting it correctly. This is the code I have so far: </p>
  
  <pre><code>HTML: 
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
      &lt;title&gt;Numbers&lt;/title&gt;
  
      &lt;!--Bootstrap and CSS Links--&gt;
      &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"&gt;
      &lt;link rel="stylesheet" href="styles.css"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;section&gt;
          &lt;header class="header m-2"&gt;Week 8 Assignment&lt;/header&gt;
          &lt;section class="row m-2"&gt;
              &lt;label class="inputLabel"&gt;Number: &lt;input type="number" id="numInput"&gt;&lt;/label&gt;
          &lt;/section&gt;
          &lt;button class="button m-1" onclick="displayText(); addNum();"&gt;Add Number&lt;/button&gt;
          &lt;button class="button m-1" disabled&gt;Calculate&lt;/button&gt;
          &lt;button class="button m-1"&gt;Reset&lt;/button&gt;
      &lt;/section&gt;
  
      &lt;section&gt;
          &lt;div class="numLabel m-2" id="numLabel"&gt;Numbers Added: &lt;/div&gt;
          &lt;p class="m-2 mt-3" id="numValue"&gt;&lt;/p&gt;
      &lt;/section&gt;
  
  &lt;script src="script.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <pre><code>JS:
  //Display "Numbers Added: " 
  function displayText() {
      document.getElementById("numLabel").style.display = "block";
  }
  
  //Add the entered value into the array
  function addNum() {
      let num = document.getElementById("numInput").value;
  
      let numArray = [];
      numArray.push(document.getElementById("numValue").innerHTML = num);
  }
  </code></pre>