title: Cleaning javascript variable scope by removing it's code from DOM
body: <p>Hope this jquery based simple code will help to explain the issue.</p>
  
  <p>html:    </p>
  
  <pre><code>&lt;script&gt; 
    $('#remover').click(function(){
     $('#block').empty();
    })
    $('#test').click(function(){
     alert(remove1);  // still displays the varibale
    })
  &lt;/script&gt;
  &lt;div id="block"&gt;  
   &lt;script&gt;
      var remove1 = 'asasdsds';
      var remove2 = 'asasdsds';
      var remove3 = 'assdsdsdas';         
      var blabla = 'blablabl';
   &lt;/script&gt;
  &lt;/div&gt;
  
  &lt;span id="remover"&gt;Remove ALL&lt;/span&gt;
  &lt;span id="test"&gt;Test&lt;/span&gt;  // it will still displays the variable.
  </code></pre>
  
  <p>I need to clear all variables from global scope by removing the block content. The block content is dynamic and can contain any javascript code. </p>
  
  <p>Thanks for reading.</p>