title: Conditional statement not working - arrays
body: <p>I have this (novice) JS question: </p>
  
  <p>I have this simple function <em>function movieStorage()</em>, which I want to check if the Yes button is clicked - if so it should storage the output (RandomItem in a new array (movieSaver). </p>
  
  <p>the Output is a random value from the hMovies-array - generated when the Yes button is clicked.</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 hMovies = [
    "hMovie1",
    "hMovie18"
  ];
  
  var movieSaver = [];
  
  var randomItem = hMovies[Math.floor(Math.random() * hMovies.length)];
  
  document.getElementById("buttonYes").addEventListener("click", ifClickedYes);
  
  function ifClickedYes() {
    document.getElementById("showResult").innerHTML = randomItem;
    return (true);
  }
  
  function movieStorage() {
    if (ifClickedYes()) {
      movieSaver.push(randomItem);
    }
  }
  console.log(movieSaver);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button id="buttonYes"&gt;Yes&lt;/button&gt;
  &lt;div id="showResult"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>