title: node.js: Is console.log() a function?
body: <p>Exactly, is console.log() a function? Why do these following two code snippets have different output?</p>
  
  <pre><code>function delay(x) {
      console.log('Start of timeout');
      return x;
  };
  setTimeout(function(){console.log('End of timeout');}, delay(5000));
  console.log('Start to do something else');
  </code></pre>
  
  <p>.</p>
  
  <pre><code>function delay(x) {
      console.log('Start of timeout');
      return x;
  };
  setTimeout(console.log('End of timeout'), delay(5000));  // ???????
  console.log('Start to do something else');
  </code></pre>