title: Javascript console.log(object) vs. concatenating string
body: <p>I'm running this in node.js:</p>
  
  <pre><code>&gt; x = { 'foo' : 'bar' }
  { foo: 'bar' }
  &gt; console.log(x)
  { foo: 'bar' }
  undefined
  &gt; console.log("hmm: " + x)
  hmm: [object Object]
  undefined
  </code></pre>
  
  <p>What I don't understand is why <code>console.log(x)</code> "pretty-prints" the object, whereas string concatenation "ugly-prints" it.  And more importantly, what's the best way to make it print <code>hmm: { foo: 'bar' }</code>?</p>