title: Add value to an array
body: <p>I'm very new in coding, so be patient please. I've made an array that looks like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var minArray = ["Hello", "Hi", "Yes", "No", "Good"];
  
  function printit(number) {
    document.getElementById('test').innerHTML = minArray[number];
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form name="f1"&gt;
    &lt;input type="text" value="" id="number" /&gt;
    &lt;input type="button" value="Word is:" onclick="printit(number)" /&gt;
  &lt;/form&gt;
  &lt;br/&gt;
  &lt;div id="test" /&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>And I'd like to write in a number in the text field and then get that specific word from the array. So if I were to write 1 and then press print, the outcome would be: Hi. </p>
  
  <p>Anyone that can nudge me in the right direction?</p>