title: Javascript Closures are not working?
body: <p>I'm trying to implement clojure in javascript. Can anyone see what the problem is?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> var a = (
            function()
            {
              var privateFunction = function()
                                    {
                                      alert('Hello');
                                    }
      
              var OsmanFunction = function()
                                    {
                                      alert('Osman');
                                    }
            return
                  {
                   publicFunction: function()
                                   {
                                     privateFunction(); 
                                   }
      
                   OsmanFunction: function()
                                   {
                                     OsmanFunction(); 
                                   }
         }})();</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
      &lt;head&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"&gt;&lt;/script&gt;
       &lt;/head&gt;
      
      &lt;body&gt;
      &lt;p&gt; &lt;a href="#" id="hitme" onclick="a.OsmanFunction()"&gt;Please hit me&lt;/a&gt;&lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>