title: Make text appear/disappear on button click
body: <p>I'm trying to make the button alternate the text from hidden using 'none' to appear using 'block'. I tried the below but it did not work</p>
  
  <pre><code>&lt;p id='demo' style = 'display: none'&gt;Hello Javascript&lt;/p&gt;     
  &lt;button type='button' onclick="document.getElementById('demo').style.display='block'" &gt;click me&lt;/ button&gt;
  </code></pre>
  
  <p>I want to convert event listener to Javascript and run from there. </p>