title: onclick change background of div
body: <p>I have a problem with a div changing background but i also need it to change back when the background color has been applied.</p>
  
  <p>Code: JavaScript:</p>
  
  <pre><code>function myFunction() { 
      if (document.getElementById("demo").style.background == "#ff77ee") {
      document.getElementById("demo").style.background = "#000";
  } else{
      document.getElementById("demo").style.background = "#ff77ee";
  }
  }
  </code></pre>
  
  <p>Code: HTML:</p>
  
  <pre><code>&lt;div id="demo" onclick="javascript:myFunction();"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Code: Style: ( Its in my Index File )</p>
  
  <pre><code>#demo{
      background: #000;
      width: 200px;
      height: 200px;
  }
  </code></pre>
  
  <p><strong>What i would like it to do is that i want to onclick change the background color to pink. then if i click on it again i would like the color to be the original color - Black.</strong></p>