title: How to call function inside the IIFE
body: <pre><code>&lt;a onclick="testFunction(); return false;"&gt;Click me&lt;/a&gt;
  &lt;script type="text/script"&gt;
      (function (){
          var testFunction = function(){
              console.log('From test function');
          };
      })();   
  &lt;/script&gt;
  </code></pre>
  
  <p>In the above code, when I click on the hyperlink it is showing testFunction not defined. </p>
  
  <p>How do I execute the testFunction without polluting the global name space?</p>