title: Difference of calling a function with and without parentheses in JavaScript
body: <p>I was handling a JavaScript file upload event. And I have the following initializer and the following function:</p>
  
  <p><em>Initializer</em></p>
  
  <pre><code>    $('#s3-uploader').S3Uploader({
          allow_multiple_files: false,
          before_add: progressBar.show,
          progress_bar_target: $('.upload-progress-bar'),
          remove_completed_progress_bar: false
      }).bind("s3_upload_complete", function(e, content) {
          console.log(content);
      });
  </code></pre>
  
  <p><em>Function</em></p>
  
  <pre><code>var progressBar = {
      show: function() {
          $('.upload-progress-bar').show();
          return true;
      }
  }
  </code></pre>
  
  <p>In the initializer, I noticed there is a difference if I do</p>
  
  <p><code>before_add: progressBar.show</code> v.s. <code>before_add: progressBar.show()</code>. With the parentheses, it will be called once even if it is bound to the <code>before_add</code> option, and without the parentheses it will not.</p>
  
  <p>Is there an explanation for the behaviour I observed?</p>