title: trying to reverse what a conditional has executed
body: <p>I have made an "if" conditional.
  if var a > 6, a code will be executed.
  however. there is a chance that later on while the user interacts with the page, var a will no longer be greater than 6. therefore i want to take back the action the conditional has executed (for my spesific need: a delete of a div).</p>
  
  <p>my code:</p>
  
  <pre><code>if(divNum &gt; 5) {
  var lastDiv = $("div:nth-last-child(3)");
  lastDiv.remove();}
  </code></pre>
  
  <p>how do i reverse the action and get this div back?</p>