title: if display is block change it to none with javascript
body: <p>for this code</p>
  <pre><code>#element { 
    display : block
  }
  
  &lt;div id=&quot;element&quot;&gt;&lt;/div&gt;
  </code></pre>
  <p>how can I write javascript code like</p>
  <pre><code>// button on click
  if(element-display = block){
      // change it to display = none
  }
  </code></pre>