title: How to display randomly text when a button is clicked
body: <p>I've got a project to do and I'm stuck at this stage. I have 5 paragraphs that include text and images that have to be displayed randomly in the button in clicked.  I still haven't figured out how to add the images in all of this. So far this is where I am:  </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>function myFunction() {
    idArray = new Array()
    idArray [1] = "First paragraph text"
    idArray [2] = "Second paragraph text
    idArray [3] = "Third paragraph text
    idArray [4] = "Fourth paragraph text"
    idArray [5] = "Fifth paragraph text"
  
    document.getElementById("select").onclick = myFunction;
    randomParagraph = Math.floor(Math.random()*5);
  
    document.getElementById("result").innerHTML = new Array[randomParagraph];       
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;button onclick="myFunction()" id="select"&gt;Pick text&lt;/button&gt;
  
    &lt;div class="main"&gt;
      &lt;p id="result"&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;footer class="footer"&gt;Hey&lt;/footer&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>