title: What is the difference between writing a function with or without parentheses inside a function in jQuery?
body: <p>Well I'm starting with jQuery and I'm wondering what is the difference between writing a function with or without parentheses inside a function.
  For example if I have the following function:</p>
  
  <pre><code>function test(){
      alert("pen pineapple apple pen");
  }
  </code></pre>
  
  <p>This:</p>
  
  <pre><code>$(document).ready(test);
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>$(document).ready(test());
  </code></pre>
  
  <p>both show the same result: "pen pineapple apple pen"</p>