title: how to return anonymous function in javascript
body: <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;script&gt;
               function test(){                   
                   return function(){
                    alert("hi");
                  }                
               }
               test();
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is my code, can I ask why it doesnt work properly??</p>