title: How do I get the answer to the random flash-card by clicking the panel?
body: <p>I am trying to make a random flash card type of generator for javascript syntax. When i hit the random question button, it will display a random question such as "What is a variable?" but on clicking the panel, it should display the answer out of the answer array. All of the answers are in an object. I am 3 months new to programming, so any advice is appreciated.</p>
  
  <pre><code>$('button').on('click', function(){
    var ranQuestion = Math.floor(Math.random()* arrOfQuestions.length);
    $('#panel').html(arrOfQuestions[ranQuestion]);
  
    //produce answer in the panel html onclick
    $('#panel').on('click', function(){
      var pan = $('#panel').html();
      if(pan === arrOfQuestions){
         $('#panel').html(test);
      }
     })
  })
  </code></pre>
  
  <p><a href="https://codepen.io/gatehrdy/pen/GQYogj" rel="nofollow noreferrer">enter link description here</a></p>